Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Which method is called when the cursor passes over a figure?
Which method is called when the cursor passes over a figure? [message #541604] Mon, 21 June 2010 18:14 Go to next message
Asma is currently offline AsmaFriend
Messages: 41
Registered: February 2010
Member
Hi,
I want to add an action on a figure when the cursor passes over it. But,i don't know which class is used here and what method is exactly called in this situation.

Can anyone help me?

Thank you in advance

Re: Which method is called when the cursor passes over a figure? [message #541676 is a reply to message #541604] Tue, 22 June 2010 06:59 Go to previous message
Robert Wloch is currently offline Robert WlochFriend
Messages: 109
Registered: July 2009
Senior Member
Hi Asma,

in your generated diagram plugin there's a "edit.parts" package. It contains the EditParts (controllers) of your figures. Inside of these classes is an inner class which is the actual figure (view).

getPrimaryShape() on your EditParts returns their controlled figure. On each figure you can check the available methods by opening the extended figure class and pressing [Ctrl]+[o] twice (!). Relevant methods for your case might be the addYYYListener() Methods inherited from org.eclipse.draw2d.Figure such as:
addMouseListener(), addFocusListener(), addMouseMotionListener(), or even handleMouseEntered()|Exited()|Hover().

Rob
Previous Topic:Copy and Paste - Geronimo!!
Next Topic:Artefact in the display of compartments
Goto Forum:
  


Current Time: Fri Jun 21 07:11:45 GMT 2024

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

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

Back to the top