Skip to main content



      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 14:14 Go to next message
Eclipse UserFriend
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 02:59 Go to previous message
Eclipse UserFriend
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: Tue Apr 22 23:08:14 EDT 2025

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

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

Back to the top