Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » VE Bean JLabel generates another code as JCheckBox
VE Bean JLabel generates another code as JCheckBox [message #49343] Mon, 12 July 2004 13:02 Go to next message
Eclipse UserFriend
Originally posted by: khw.warnkoenig.de

Hi all outside,

I try a little with VE and it loocks verry nice. But one Problem I has. If I
do the example from the document "Build GUIs with the Eclipse Visual Editor"
then I get another code for the JLabel Bean. There is no variable generated
like the JCheckBox. Instead the code and the variable is generated inside
the private member getJContendPane(); Then the next step, change the text
from this label
Re: VE Bean JLabel generates another code as JCheckBox [message #49373 is a reply to message #49343] Mon, 12 July 2004 15:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

That was an improvement we tried to make. Over 90% of the time JLabel's
don't need their text to be changed once created, so we just made them
local. However, some people do need to change the label later, but we
had no way to "promote" the JLabel to be a variable. So just last week
we changed it so that JLabels won't have a get method, but they will
have a variable that can be accessed to change. This has not got into a
build yet.


--
Thanks, Rich Kulp

Re: VE Bean JLabel generates another code as JCheckBox [message #49551 is a reply to message #49343] Tue, 13 July 2004 11:09 Go to previous messageGo to next message
David Pérez is currently offline David PérezFriend
Messages: 52
Registered: July 2009
Member
The workaround I use, is to manually create the field by hand.

I change this:

class MyWindow {
....
void getMyPanel() {
...
JLabel myLabel = new JLabel();
...
}
}

to:

class MyWindow {
JLabel myLabel
....
void getMyPanel() {
...
myLabel = new JLabel();
...
}
}


K-H Warnkönig wrote:

> Hi all outside,

> I try a little with VE and it loocks verry nice. But one Problem I has. If I
> do the example from the document "Build GUIs with the Eclipse Visual Editor"
> then I get another code for the JLabel Bean. There is no variable generated
> like the JCheckBox. Instead the code and the variable is generated inside
> the private member getJContendPane(); Then the next step, change the text
> from this labelŽfrom theactionPerformed() jLabel.setText("kjhjh") faild,
> because its unknown there.

> Where can I chane this behavior or what did Iwrong

> Thanks a lot

> Karl-Heinz


> ________________________
> Warnkönig Elektronik

> Karl-Heinz Warnkönig
> Im Weinberg 3
> 88709 Meersburg

> tel. 07532 5432
> fax. 07532 2484
Re: VE Bean JLabel generates another code as JCheckBox [message #49729 is a reply to message #49373] Tue, 13 July 2004 15:12 Go to previous messageGo to next message
Youjun Luo is currently offline Youjun LuoFriend
Messages: 2
Registered: July 2009
Junior Member
"Rich Kulp" <richkulp@NO.SPAM.us.ibm.com> schrieb im Newsbeitrag
news:ccuaea$fhu$4@eclipse.org...
> That was an improvement we tried to make. Over 90% of the time JLabel's
> don't need their text to be changed once created, so we just made them
> local. However, some people do need to change the label later, but we
> had no way to "promote" the JLabel to be a variable. So just last week
> we changed it so that JLabels won't have a get method, but they will
> have a variable that can be accessed to change. This has not got into a
> build yet.
>
>
> --
> Thanks, Rich Kulp
> 
>

Hi Rich!

If you will provide an accessible variable for JLabels, why not simply
provide a get method uniformly like for other components?

Thanks.

--
Youjun Luo
Sulzer GmbH
Frankfurter Ring 162
80807 Munich
Germany
Re: VE Bean JLabel generates another code as JCheckBox [message #49759 is a reply to message #49729] Tue, 13 July 2004 15:43 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Because that is extra overhead for a label when most people don't even
need the variable. Very few people actually even need it as a separate
variable.

> Hi Rich!
>
> If you will provide an accessible variable for JLabels, why not simply
> provide a get method uniformly like for other components?
>
> Thanks.
>
> --
> Youjun Luo
> Sulzer GmbH
> Frankfurter Ring 162
> 80807 Munich
> Germany
>
>

--
Thanks, Rich Kulp

Re: VE Bean JLabel generates another code as JCheckBox [message #594943 is a reply to message #49343] Mon, 12 July 2004 15:25 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

That was an improvement we tried to make. Over 90% of the time JLabel's
don't need their text to be changed once created, so we just made them
local. However, some people do need to change the label later, but we
had no way to "promote" the JLabel to be a variable. So just last week
we changed it so that JLabels won't have a get method, but they will
have a variable that can be accessed to change. This has not got into a
build yet.


--
Thanks, Rich Kulp

Re: VE Bean JLabel generates another code as JCheckBox [message #595008 is a reply to message #49343] Tue, 13 July 2004 11:09 Go to previous message
David Pérez is currently offline David PérezFriend
Messages: 52
Registered: July 2009
Member
The workaround I use, is to manually create the field by hand.

I change this:

class MyWindow {
....
void getMyPanel() {
...
JLabel myLabel = new JLabel();
...
}
}

to:

class MyWindow {
JLabel myLabel
....
void getMyPanel() {
...
myLabel = new JLabel();
...
}
}


K-H Warnkönig wrote:

> Hi all outside,

> I try a little with VE and it loocks verry nice. But one Problem I has. If I
> do the example from the document "Build GUIs with the Eclipse Visual Editor"
> then I get another code for the JLabel Bean. There is no variable generated
> like the JCheckBox. Instead the code and the variable is generated inside
> the private member getJContendPane(); Then the next step, change the text
> from this labelŽfrom theactionPerformed() jLabel.setText("kjhjh") faild,
> because its unknown there.

> Where can I chane this behavior or what did Iwrong

> Thanks a lot

> Karl-Heinz


> ________________________
> Warnkönig Elektronik

> Karl-Heinz Warnkönig
> Im Weinberg 3
> 88709 Meersburg

> tel. 07532 5432
> fax. 07532 2484
Re: VE Bean JLabel generates another code as JCheckBox [message #595067 is a reply to message #49373] Tue, 13 July 2004 15:12 Go to previous message
Youjun Luo is currently offline Youjun LuoFriend
Messages: 2
Registered: July 2009
Junior Member
"Rich Kulp" <richkulp@NO.SPAM.us.ibm.com> schrieb im Newsbeitrag
news:ccuaea$fhu$4@eclipse.org...
> That was an improvement we tried to make. Over 90% of the time JLabel's
> don't need their text to be changed once created, so we just made them
> local. However, some people do need to change the label later, but we
> had no way to "promote" the JLabel to be a variable. So just last week
> we changed it so that JLabels won't have a get method, but they will
> have a variable that can be accessed to change. This has not got into a
> build yet.
>
>
> --
> Thanks, Rich Kulp
> 
>

Hi Rich!

If you will provide an accessible variable for JLabels, why not simply
provide a get method uniformly like for other components?

Thanks.

--
Youjun Luo
Sulzer GmbH
Frankfurter Ring 162
80807 Munich
Germany
Re: VE Bean JLabel generates another code as JCheckBox [message #595077 is a reply to message #49729] Tue, 13 July 2004 15:43 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Because that is extra overhead for a label when most people don't even
need the variable. Very few people actually even need it as a separate
variable.

> Hi Rich!
>
> If you will provide an accessible variable for JLabels, why not simply
> provide a get method uniformly like for other components?
>
> Thanks.
>
> --
> Youjun Luo
> Sulzer GmbH
> Frankfurter Ring 162
> 80807 Munich
> Germany
>
>

--
Thanks, Rich Kulp

Previous Topic:VE I20040712 and SWT Linux ?
Next Topic:properties can be set but not shown after reload Visual Editor
Goto Forum:
  


Current Time: Wed Jul 17 12:23:05 GMT 2024

Powered by FUDForum. Page generated in 0.04112 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top