Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Different Selection based on figures
Different Selection based on figures [message #221041] Wed, 09 August 2006 05:43 Go to next message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

I have a compartment figure (like the circuits in the logic example).
Unlike the circuits, my figure has a title bar. I would like to change
the selection tool based on where in the figure the mouse down is
pressed. If the user selects inside the compartment then I would like
to use a Marguee selection. If they select the title, then i would like
to use a single selection tool.

I know I need to override the getDragTracker() method in my edit part,
but since my title and compartment areas are just figures within my
compartment figure (and not edit parts), I am not able to determine
where the selection occurred. i really don't want to create separate
edit parts for these two parts of my compartment edit part.

any ideas?

cheers,
ian
Re: Different Selection based on figures [message #221065 is a reply to message #221041] Wed, 09 August 2006 11:52 Go to previous message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
You should be able to call containsPoint() in each of the figure for the
editpart and determine which figure has the mouse "focus"

Ian Bull wrote:
> I have a compartment figure (like the circuits in the logic example).
> Unlike the circuits, my figure has a title bar. I would like to change
> the selection tool based on where in the figure the mouse down is
> pressed. If the user selects inside the compartment then I would like
> to use a Marguee selection. If they select the title, then i would like
> to use a single selection tool.
>
> I know I need to override the getDragTracker() method in my edit part,
> but since my title and compartment areas are just figures within my
> compartment figure (and not edit parts), I am not able to determine
> where the selection occurred. i really don't want to create separate
> edit parts for these two parts of my compartment edit part.
>
> any ideas?
>
> cheers,
> ian
>
Previous Topic:Displaced text with Antialiasing
Next Topic:How to fold the figures in Draw2D diagrams?
Goto Forum:
  


Current Time: Mon Jan 20 17:21:05 GMT 2025

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

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

Back to the top