|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.interactor.AbstractInteractor
diva.canvas.interactor.DragInteractor
diva.canvas.connector.ConnectorInteractor
public class ConnectorInteractor
An interactor for dragging one end of a connector. This is a utility class designed for use in conjunction with ConnectorManipulator.
Constructor Summary | |
---|---|
ConnectorInteractor(ConnectorManipulator m)
Create a new interactor to be used with the given manipulator |
Method Summary | |
---|---|
protected void |
_notifyConnectorListeners(ConnectorEvent event,
int id)
Notify registered connector listeners of the specified event. |
void |
addConnectorListener(ConnectorListener l)
Add a connector listener. |
protected void |
fireConnectorEvent(int id)
Fire a connector event to all connector listeners. |
Connector |
getConnector()
Get the current connector. |
GrabHandle |
getHandle()
Get the current grab handle. |
Figure |
getTarget()
Get the current target figure. |
void |
mouseReleased(LayerEvent event)
Handle a mouse-released event. |
void |
removeConnectorListener(ConnectorListener l)
Remove a connector listener. |
void |
setup(LayerEvent e)
Initialize the interactor when a grab-handle is grabbed. |
void |
snapToSite(FigureContainer container,
Rectangle2D hitRect)
Pick a site using the connector target and then snap to it. |
void |
translate(LayerEvent e,
double dx,
double dy)
Respond to translation of the grab-handle. |
Methods inherited from class diva.canvas.interactor.DragInteractor |
---|
addLayerListener, appendConstraint, constrainPoint, fireLayerEvent, getSelectiveEnabled, getTargetArray, getX, getY, mouseDragged, mousePressed, prependConstraint, removeLayerListener, setSelectiveEnabled, setTargetArray, targets |
Methods inherited from class diva.canvas.interactor.AbstractInteractor |
---|
accept, getMouseFilter, isConsuming, isEnabled, isMotionEnabled, mouseClicked, mouseEntered, mouseExited, mouseMoved, setConsuming, setEnabled, setMotionEnabled, setMouseFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectorInteractor(ConnectorManipulator m)
Method Detail |
---|
public void addConnectorListener(ConnectorListener l)
protected void fireConnectorEvent(int id)
public Connector getConnector()
public GrabHandle getHandle()
public Figure getTarget()
public void mouseReleased(LayerEvent event)
mouseReleased
in interface LayerListener
mouseReleased
in class DragInteractor
public void removeConnectorListener(ConnectorListener l)
public void setup(LayerEvent e)
setup
in class DragInteractor
public void snapToSite(FigureContainer container, Rectangle2D hitRect)
public void translate(LayerEvent e, double dx, double dy)
translate
in class DragInteractor
protected void _notifyConnectorListeners(ConnectorEvent event, int id)
event
- The event.id
- The id of the event (dragged, dropped, etc.).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |