Skip to main content



      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 08:47 Go to next message
Eclipse UserFriend
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 09:16 Go to previous messageGo to next message
Eclipse UserFriend
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 06:12 Go to previous messageGo to next message
Eclipse UserFriend
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 12:56 Go to previous messageGo to next message
Eclipse UserFriend
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 13:38 Go to previous message
Eclipse UserFriend
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: Mon Apr 28 02:53:05 EDT 2025

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

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

Back to the top