Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Marquee Tool Help(Editing the functionality of the marquee inside a container shape)
Marquee Tool Help [message #1708239] Mon, 14 September 2015 20:56 Go to next message
Robert Grant is currently offline Robert GrantFriend
Messages: 4
Registered: August 2015
Junior Member
I am trying to change the functionality of my diagram so that I am more easily able to use the marquee tool. I have a large container shape in which I am placing objects in. When the cursor is outside the container shape but inside the diagram, the marquee tool is automatically enabled when I click and drag (seen in the first image). But whenever the cursor is inside the container shape and I click and drag, it will not allow the marquee tool to work unless clicked on in the palette (seen in the second image). I am wondering if there is a way to use the marquee tool on the container shape even when the selector tool is being used. Or enable the marquee tool when I click inside the large container shape.

I am currently using Graphiti to try and complete this. The Graphiti task is using AbstractTool when dealing with the marquee tool inside of the diagram. If I retrieve the PaletteRoot using getPaletteRoot(), I am able to access more information about the GFMarqueToolEntry, but I can't change any of the properties. Is this possible to do using GEF?

index.php/fa/23256/0/
index.php/fa/23257/0/

  • Attachment: pic1.png
    (Size: 20.70KB, Downloaded 410 times)
  • Attachment: pic2.png
    (Size: 21.05KB, Downloaded 384 times)

[Updated on: Mon, 14 September 2015 20:57]

Report message to a moderator

Re: Marquee Tool Help [message #1708539 is a reply to message #1708239] Thu, 17 September 2015 11:00 Go to previous messageGo to next message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 244
Registered: July 2009
Location: Lünen
Senior Member
I do not know how Graphiti handles the registration of tools, but in GEF the list of tools (and the current active tool) is hold by the EditDomain. A palette entry usually sets the active tool in the domain. You will have to find a way (within Graphiti) to change the palette entry so that it creates and sets a customized MarqueeSelectionTool, where you could overwrite handleButtonDown(int) to check whether a marquee drag is to be started or not.
Re: Marquee Tool Help [message #1723363 is a reply to message #1708539] Mon, 15 February 2016 07:23 Go to previous messageGo to next message
swaroop shastri is currently offline swaroop shastriFriend
Messages: 2
Registered: February 2016
Location: Bangalore
Junior Member
Hi,

Is there any tutorial , which describes , how to add Marquee tool in GEF. How the event and listeners work. I am unable to find out any such example on web. Alexander could you please help me with this.

Regards,
Swaroop Shastri
ssroop74@gmail.com
Re: Marquee Tool Help [message #1723443 is a reply to message #1723363] Mon, 15 February 2016 17:42 Go to previous message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 244
Registered: July 2009
Location: Lünen
Senior Member
No, there is no direct tutorial related to MarqueeTool, but the code is pretty straight forward. The marquee tool is created through a MarqueeToolEntry. The palette entries in turn are created through a factory. You can e.g. take a look at the FlowExample, where the FlowEditorPaletteFactory is the respective implementation.

In either case, before you dig into the details, I recommend that you consult our reference documentation, so that concepts like domain, tools, etc. (and the related responsibilities) are clear.
Previous Topic:automation testing
Next Topic:DirectedGraph: nodes out of order
Goto Forum:
  


Current Time: Fri Apr 26 09:25:02 GMT 2024

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

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

Back to the top