Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » new Action(String text, int style) can I change style post construction?
new Action(String text, int style) can I change style post construction? [message #27600] Mon, 05 May 2003 15:04 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #27610 is a reply to message #27604] Mon, 05 May 2003 16:03 Go to previous messageGo to next message
Eclipse UserFriend
That only allows it to be changed to a menu creator or a check later. It
doesn't allow any of the other styles to be set.

Rich Kulp
Re: new Action(String text, int style) can I change style post construction? [message #27612 is a reply to message #27610] Mon, 05 May 2003 16:08 Go to previous messageGo to next message
Eclipse UserFriend
Randy,

However for your case, since you were using Action(text), this is
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
Re: new Action(String text, int style) can I change style post construction? [message #27614 is a reply to message #27610] Mon, 05 May 2003 16:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: simon.ibm.oti.lab

The AS_UNSPECIFIED is only there to allow for backward compatibility - in
2.0, you could change the style to check or drop down menu by accessing the
appropriate methods.

Simon :-)

"Richard L. Kulp" <richkulp@us.ibm.com> wrote in message
news:b96g3o$vl4$1@rogue.oti.com...
> That only allows it to be changed to a menu creator or a check later. It
> doesn't allow any of the other styles to be set.
>
> Rich Kulp
>
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 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:Updating to a CVS branch?
Next Topic:How to search an import type in the workspace
Goto Forum:
  


Current Time: Mon Jun 30 06:47:28 EDT 2025

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

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

Back to the top