Hello Daniel,
These questions belong to the org.eclipse.tools.gef
newsgroup.
1. Figure does nothing to respond to user actions -
it is the respective edit part responsibility (mouse/keyboard input is mostly
handled by the Tools/Drag trackers - you might want to see the sources). But if
you just want to change cursor on mouse over you can simply assign it to
the figure using IFigure::setCursor.
2. To allow DnD to the GEF diagram you
should:
1. Add Drop listener derived
from org.eclipse.gef.dnd.AbstractTransferDropTargetListener to your viewer.
2. Issue request you need from
the listener (by overriding the createTargetRequest)
3. Update the request as it is
needed (updateTargetRequest method).
4. Handle the request in the
respective edit policy tied to the respective edit part.
If you have more questions it would be better to
move to the newsgroup - anyway, most (if not all) people subscribed to this
mailing list read the newsgroup.
Best regards,
Eugene
----- Original Message -----
Sent: Tuesday, April 13, 2004 2:34
PM
Subject: [gef-dev] drop actions
Hello,
I am developing a gef application using the
org.eclipse.gef.examples.logic_2.1.0 (logic circuits) example as a start
point. I have a couple of questions about listeners.
1º- How does a figure, lets say a
ciruit or a led figure, listen to mouse actions? I do not find in the exmaple
code how or where the the figure listens when the mouse goes over it. For
example where or how does the mouse pointer changes when the mouse goes over a
figure?
2º- Other question is how to add to a
figure a drop listener. What I am triying to do to is dragging an item from a
tree view coded by my self to any any figure in the diagram . I wnat to drag
from that tree view to a figure in the diagram but I do not know how to add
the drop listener to the figure.
Does any of you (specially Eric Bordeau) how to
solve this questions?
Thanks a lot
Daniel del Pozo d.delpozo@xxxxxxxxxxxxxx
|