new Action(String text, int style) can I change style post construction? [message #27600] |
Mon, 05 May 2003 15:04  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Is there any way to change the style of an Action after it is constructed?
The reason I'm asking is that in my subclass, I need to provide 2 or more
constructors, one with the style, and one without. Generally, when one
constructor is the same is another plus one more parameter, then one
constructor would call the other. This means all constructors for the
subclass end up using a single constructor in the superclass. Is it safe to
call "super(null, 0);" from a subclass of Action? What is the default
style? 0?
|
|
|
Re: new Action(String text, int style) can I change style post construction? [message #27604 is a reply to message #27600] |
Mon, 05 May 2003 15:49   |
Eclipse User |
|
|
|
Originally posted by: simon.ibm.oti.lab
If you specify IAction.AS_UNSPECIFIED, the style can be changed once later
on (see java doc for this constant for more details). If you specify another
style (IAction.AS_*), then you cannot change the style again.
Simon :-)
"Randy Hudson" <none@us.ibm.com> wrote in message
news:b96ckn$tcg$1@rogue.oti.com...
> Is there any way to change the style of an Action after it is constructed?
> The reason I'm asking is that in my subclass, I need to provide 2 or more
> constructors, one with the style, and one without. Generally, when one
> constructor is the same is another plus one more parameter, then one
> constructor would call the other. This means all constructors for the
> subclass end up using a single constructor in the superclass. Is it safe
to
> call "super(null, 0);" from a subclass of Action? What is the default
> style? 0?
>
>
|
|
|
|
|
|
Re: new Action(String text, int style) can I change style post construction? [message #27628 is a reply to message #27612] |
Mon, 05 May 2003 17:29  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Richard L. Kulp" <richkulp@us.ibm.com> wrote in message
news:b96gdv$cq$1@rogue.oti.com...
> Randy,
>
> However for your case, since you were using Action(text), this is
We're using just Action(), so we'll have to now use Action(null, style);
I guess we can always use AS_UNSPECIFIED, which was my concern.
> identical to Action(text, AS_UNSPECIFIED). So for your ctors that take
> only text, then using AS_UNSPECIFIED will result in the same function
> you now have. It won't break any existing users.
>
> Rich
>
|
|
|
Powered by
FUDForum. Page generated in 0.05029 seconds