Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Setting active tool from palette
Setting active tool from palette [message #233300] Fri, 20 April 2007 16:47 Go to next message
Eclipse UserFriend
Originally posted by: xylo3.o2.pl

Hi,

How can I set active tool from palette ?
(scenario is as follows: user activates tool "A", when he selects only one
model object I'd like to force switching active editor tool from tool "A"
to tool "B")

My editor main class is derived from GraphicalEditorWithFlyoutPalette. I
know that PaletteViewer class provides API that I need, but I don't know
how I should initialize and configure Palette Viewer instance to work
with my editor...

Any help will be appreciated!

Regards,
Max
Re: Setting active tool from palette [message #233309 is a reply to message #233300] Fri, 20 April 2007 18:43 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi Max,

There should be an example of the feature you're asking about in GEF
example editors (Logic and Geoshape). For example when you create
something on the diagram, (i.e. select shape on the palette and then click
on the diagram to put the shape on the diagram) note that the active tool
becomes selection tool instead of the creation tool. Just take a quick
look at CreationTool#handleFinished() (at getDomain().loadDefaultTool())
and track the things happening. On the palette viewer use setActiveTool().
Hope this helps.

Cheers,
Alex
Re: Setting active tool from palette [message #233323 is a reply to message #233309] Fri, 20 April 2007 21:50 Go to previous message
Eclipse UserFriend
Originally posted by: xylo3.o2.pl

Thanks for fast and very helpful answer - it is enough to implement what I
need :-)

Regards,
Max
Previous Topic:GEF Update site
Next Topic:Buttons in palette
Goto Forum:
  


Current Time: Mon Oct 03 18:25:59 GMT 2022

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

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

Back to the top