Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » How Can I register Selection and Key Listeners for a shape
How Can I register Selection and Key Listeners for a shape [message #926072] Fri, 28 September 2012 09:19 Go to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
Hello,

I have to register a selection listener to change Image for a shape and expand/ collapse has to be done on the event.

Is there any way to register listener for a shape.I want to some operation on specific key pressed.

I have gone through the below post
how can I install EditPolicy to the shape [message #906960]

Can I change the Image on getSelectionInfo method?

Advance thanks for you reply.

Thanks
Raghav

[Updated on: Fri, 28 September 2012 09:20]

Report message to a moderator

Re: How Can I register Selection and Key Listeners for a shape [message #929001 is a reply to message #926072] Mon, 01 October 2012 06:06 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Raghav,

you can influence the way a shape is shown on selection by hooking into the
getSelectionInfoForShape() method. Note that there'a open bugzilla (
https://bugs.eclipse.org/bugs/show_bug.cgi?id=365172) regarding not working
line width settings there.

Registering a listener for selection or reacting on key events is currently
not possible, but there is an open enhancement request for enabling key
shortcuts for features: https://bugs.eclipse.org/bugs/show_bug.cgi?id=323349

Michael
Re: How Can I register Selection and Key Listeners for a shape [message #933720 is a reply to message #929001] Fri, 05 October 2012 09:23 Go to previous message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
Michel,

Thanks for your response.

As of now i am adding listeners to Graphical viewer.

getGraphicalViewer().getControl().addMouseListener(this);

I hope this is a good way as of now.
Previous Topic:DirectEdit with doubleckick
Next Topic:Setting BoxRelativeAnchor at the source of ConnectionContext does work!!
Goto Forum:
  


Current Time: Thu Apr 18 02:12:14 GMT 2024

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

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

Back to the top