Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Show selection when a connection is selected
Show selection when a connection is selected [message #661373] Thu, 24 March 2011 12:47 Go to next message
JeTBLaCK  is currently offline JeTBLaCK Friend
Messages: 41
Registered: March 2011
Member
Hi!

I need to show a selection when a connection is selected. I use "ConnectionEditPolicy" but it understands only Delete.

Any suggestion?

Re: Show selection when a connection is selected [message #661380 is a reply to message #661373] Thu, 24 March 2011 13:16 Go to previous messageGo to next message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad BandaruFriend
Messages: 100
Registered: March 2010
Location: Hyderabad
Senior Member

Hi,
Use this editpolicy org.eclipse.gef.editpolicies.SelectionEditPolicy
and implement the hideSeletion() and showSelection() methods.
You can do something like this in the implementaion in showSelection() set the connection color (say blue) to indicate the selection and in hideSelection() set the color back to original color


Re: Show selection when a connection is selected [message #661557 is a reply to message #661380] Fri, 25 March 2011 10:12 Go to previous messageGo to next message
JeTBLaCK  is currently offline JeTBLaCK Friend
Messages: 41
Registered: March 2011
Member
Thank you, Prasad.

If I need a normal selection like a rectangle selected, should I use that policy or another one?
Re: Show selection when a connection is selected [message #661645 is a reply to message #661557] Fri, 25 March 2011 16:56 Go to previous messageGo to next message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad BandaruFriend
Messages: 100
Registered: March 2010
Location: Hyderabad
Senior Member

Small doubt you said you want to show selection when something is selected . Do you mean to say that you need to show some feed back so that user understands that the connection is selected? And regarding showing selection (feedback) on rectangular figures you can always use the same edit policy irrespective of the type of figures. All you have to do is get the respective figure representing the selection and update it's border thickness or color based on you requirement .


Re: Show selection when a connection is selected [message #661651 is a reply to message #661645] Fri, 25 March 2011 17:38 Go to previous message
JeTBLaCK  is currently offline JeTBLaCK Friend
Messages: 41
Registered: March 2011
Member
Thank you for your help, Prasad.

I have implemented a policy called "BendpointEditPolicy" that it is what I was looking for. Smile
Previous Topic:Multiple connection layers
Next Topic:Change focus
Goto Forum:
  


Current Time: Thu Apr 25 00:37:04 GMT 2024

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

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

Back to the top