diva.canvas.connector
Class ArcInteractor
java.lang.Object
diva.canvas.interactor.AbstractInteractor
diva.canvas.interactor.DragInteractor
diva.canvas.connector.ConnectorInteractor
diva.canvas.connector.ArcInteractor
- All Implemented Interfaces:
- LayerListener, LayerMotionListener, Interactor, EventListener
public class ArcInteractor
- extends ConnectorInteractor
An interactor for dragging either end of an arc connector and for
for altering the shape of the arc by dragging a midpoint grab handle.
This class is designed for use in conjunction with ArcManipulator.
- Version:
- $Revision: 1.2 $
- Author:
- Edward A. Lee
Method Summary |
protected void |
fireConnectorEvent(int id)
Fire a connector event to all connector listeners. |
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 |
ArcInteractor
public ArcInteractor(ArcManipulator m)
- Create a new interactor to be used with the given manipulator.
fireConnectorEvent
protected void fireConnectorEvent(int id)
- Fire a connector event to all connector listeners.
- Overrides:
fireConnectorEvent
in class ConnectorInteractor
translate
public void translate(LayerEvent e,
double dx,
double dy)
- Respond to translation of the grab-handle. Move the
grab-handle, and adjust the connector accordingly,
snapping it to a suitable target if possible.
- Overrides:
translate
in class ConnectorInteractor
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.