Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » which tool is selected from palette viewer
which tool is selected from palette viewer [message #140350] Mon, 28 June 2004 06:34 Go to next message
Eclipse UserFriend
Originally posted by: harshs.bsil.com

Hi,
how to determine that which tool is been selected from the palette viewer.
actually i want to set a particular value to true or false depending upon
the selection of a particular component.

i am using the following line

Tool t = getActiveTool();

after this i want to compare the value of tool with the component so that
i can change the value....

if(t == ? )
{

}


Regards,
Harsh Singal
Re: which tool is selected from palette viewer [message #140646 is a reply to message #140350] Tue, 29 June 2004 14:40 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
You can do an instanceof check (PanningSelectionTool, MarqueeSelectionTool,
ConnectionCreationTool or CreationTool). If it's a creation tool you can
get its creation factory (although I think that method is protected) and
determine what component it is creating.

"Harsh Singal" <harshs@bsil.com> wrote in message
news:cboe5u$i8a$1@eclipse.org...
> Hi,
> how to determine that which tool is been selected from the palette viewer.
> actually i want to set a particular value to true or false depending upon
> the selection of a particular component.
>
> i am using the following line
>
> Tool t = getActiveTool();
>
> after this i want to compare the value of tool with the component so that
> i can change the value....
>
> if(t == ? )
> {
>
> }
>
>
> Regards,
> Harsh Singal
>
Previous Topic:Select Tool to be default
Next Topic:Getting started
Goto Forum:
  


Current Time: Thu Apr 25 00:18:45 GMT 2024

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

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

Back to the top