|
Re: Nice to have getJLabel() [message #50630 is a reply to message #50577] |
Fri, 16 July 2004 14:28 |
Eclipse User |
|
|
|
Originally posted by: myersj.nospam.us.ibm.com
Hi Winni,
We've fixed this so that labels will have global fields rather than get
methods (to cut down on source bloat as labels don't need to be changed
in 90% of the cases).
This fix hasn't made it into a stable build yet. If you'd like to
change the behavior yourself before a new build comes out, you can
follow these instructions (from an earlier newsgroup post)
Go to the eclipse\plugins\org.eclipse.ve.jfc_1.0.0\overrides\javax\swi ng
directory and edit the JLabel.override file in a text editor, and remove
this line:
<addedEObjects xsi:type="jcm:BeanDecorator" beanLocation="LOCAL"/>
The same goes for the Label.override in the awt directory.
For the fix we compromised by making Labels have a global field, but not
a get method (will be initialized in the parent's method.) For
manipulation of labels after the construction, in events, etc, you can
change the global field directly, rather than the usual get methods
employed by the VE code pattern. e.g. label1.setText("foo"); rather than
getLabel1().setText("foo");
Eventually we hope to have a refactoring so that any given bean can be
promoted to having its own field and get method, or demoted to being
initialized in its parent's method.
- Jeff
Winni P. wrote:
> Hi,
>
> I used VE M1 (with Eclipse 3.0.0 M8) and I enjoyed the methods getJLabel
> for each Label, because I have to set several properties (f.e. the
> Dimension, Color, Textstyle..)
>
> In S20040628 there is no method like getJLabel and the Label are only
> local in the method initialize() :-((
>
> How can I create this getJLabel()-methods?
> How can I use them as member-Variables without editing the source?
>
> Thanks and have a nice Weekend
>
> Winni
>
|
|
|
Re: Nice to have getJLabel() [message #50713 is a reply to message #50577] |
Fri, 16 July 2004 14:35 |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
You still don't need a getLabel() to change the properties. You can
either change them at design time through the property sheet, or at
runtime you can change them in the initialize method. The only time you
need a getLabel() is if you want to change at some time AFTER it has
been initialized.
--
Thanks, Rich Kulp
|
|
|
Re: Nice to have getJLabel() [message #65720 is a reply to message #50713] |
Fri, 08 October 2004 19:40 |
Eclipse User |
|
|
|
Originally posted by: mb.thomas-daily.de
Rich Kulp schrieb:
> You still don't need a getLabel() to change the properties. You can
> either change them at design time through the property sheet, or at
> runtime you can change them in the initialize method. The only time you
> need a getLabel() is if you want to change at some time AFTER it has
> been initialized.
For my taste the code just look cleaner with getLabel(). I still achieve
getLabel() doing this workaround: I drop a new label on the "empty
background". Hope that helps. Although I don't know how 1.0 behaves.
I would like to see a global switch for that issue.
Marcus
|
|
|
Re: Nice to have getJLabel() [message #65764 is a reply to message #65720] |
Fri, 08 October 2004 20:06 |
Eclipse User |
|
|
|
Originally posted by: myersj.nospam.gmail.com
Marcus,
There's an easier way to prevent this behavior from occuring. Open the
file
eclipse/plugins/org.eclipse.ve.jfc_1.0.1/overrides/javax/swi ng/JLabel.override
in a text editor and delete the following line from that file:
<addedEObjects xsi:type="jcm:BeanDecorator" beanLocation="GLOBAL_LOCAL"/>
You can also remove the same line from overrides/java/awt/Label.override
The issue with customizable source patterns and flexibility of whether
get methods are generated for each member is still being worked on.
Hopefully this feature will be addressed in the next major release of
the VE.
- Jeff
Marcus Beyer wrote:
> Rich Kulp schrieb:
>
>> You still don't need a getLabel() to change the properties. You can
>> either change them at design time through the property sheet, or at
>> runtime you can change them in the initialize method. The only time
>> you need a getLabel() is if you want to change at some time AFTER it
>> has been initialized.
>
>
> For my taste the code just look cleaner with getLabel(). I still achieve
> getLabel() doing this workaround: I drop a new label on the "empty
> background". Hope that helps. Although I don't know how 1.0 behaves.
>
> I would like to see a global switch for that issue.
>
> Marcus
|
|
|
Re: Nice to have getJLabel() [message #65929 is a reply to message #65764] |
Sun, 10 October 2004 10:12 |
Eclipse User |
|
|
|
Originally posted by: mb.thomas-daily.de
Jeff Myers schrieb:
> Marcus,
>
> There's an easier way to prevent this behavior from occuring. Open the
> file
> eclipse/plugins/org.eclipse.ve.jfc_1.0.1/overrides/javax/swi ng/JLabel.override
> in a text editor and delete the following line from that file:
> <addedEObjects xsi:type="jcm:BeanDecorator" beanLocation="GLOBAL_LOCAL"/>
Thank you!! That did the trick :)
> The issue with customizable source patterns and flexibility of whether
> get methods are generated for each member is still being worked on.
> Hopefully this feature will be addressed in the next major release of
> the VE.
Cool!
thanx!
Marcus
|
|
|
Re: Nice to have getJLabel() [message #65951 is a reply to message #65764] |
Sun, 10 October 2004 10:28 |
Eclipse User |
|
|
|
Originally posted by: mb.thomas-daily.de
Jeff Myers schrieb:
>> For my taste the code just look cleaner with getLabel(). I still
>> achieve getLabel() doing this workaround: I drop a new label on the
>> "empty background". Hope that helps. Although I don't know how 1.0
>> behaves.
BTW: this procedure is still nice to create non-GUI beans (e.g.
DefaultListModel etc.) with VE-styled get methods.
Marcus
|
|
|
|
Re: Nice to have getJLabel() [message #595394 is a reply to message #50577] |
Fri, 16 July 2004 14:28 |
Jeff Myers Messages: 396 Registered: July 2009 |
Senior Member |
|
|
Hi Winni,
We've fixed this so that labels will have global fields rather than get
methods (to cut down on source bloat as labels don't need to be changed
in 90% of the cases).
This fix hasn't made it into a stable build yet. If you'd like to
change the behavior yourself before a new build comes out, you can
follow these instructions (from an earlier newsgroup post)
Go to the eclipse\plugins\org.eclipse.ve.jfc_1.0.0\overrides\javax\swi ng
directory and edit the JLabel.override file in a text editor, and remove
this line:
<addedEObjects xsi:type="jcm:BeanDecorator" beanLocation="LOCAL"/>
The same goes for the Label.override in the awt directory.
For the fix we compromised by making Labels have a global field, but not
a get method (will be initialized in the parent's method.) For
manipulation of labels after the construction, in events, etc, you can
change the global field directly, rather than the usual get methods
employed by the VE code pattern. e.g. label1.setText("foo"); rather than
getLabel1().setText("foo");
Eventually we hope to have a refactoring so that any given bean can be
promoted to having its own field and get method, or demoted to being
initialized in its parent's method.
- Jeff
Winni P. wrote:
> Hi,
>
> I used VE M1 (with Eclipse 3.0.0 M8) and I enjoyed the methods getJLabel
> for each Label, because I have to set several properties (f.e. the
> Dimension, Color, Textstyle..)
>
> In S20040628 there is no method like getJLabel and the Label are only
> local in the method initialize() :-((
>
> How can I create this getJLabel()-methods?
> How can I use them as member-Variables without editing the source?
>
> Thanks and have a nice Weekend
>
> Winni
>
|
|
|
Re: Nice to have getJLabel() [message #595420 is a reply to message #50577] |
Fri, 16 July 2004 14:35 |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
You still don't need a getLabel() to change the properties. You can
either change them at design time through the property sheet, or at
runtime you can change them in the initialize method. The only time you
need a getLabel() is if you want to change at some time AFTER it has
been initialized.
--
Thanks, Rich Kulp
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03631 seconds