diva.canvas.connector
Class ArcInteractor

java.lang.Object
  extended by diva.canvas.interactor.AbstractInteractor
      extended by diva.canvas.interactor.DragInteractor
          extended by diva.canvas.connector.ConnectorInteractor
              extended by diva.canvas.connector.ArcInteractor
All Implemented Interfaces:
LayerListener, LayerMotionListener, Interactor, java.util.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:
$Id: ArcInteractor.java 38798 2005-07-08 20:00:01Z cxh $
Author:
Edward A. Lee

Constructor Summary
ArcInteractor(ArcManipulator m)
          Create a new interactor to be used with the given manipulator.
 
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.connector.ConnectorInteractor
_notifyConnectorListeners, addConnectorListener, getConnector, getHandle, getTarget, mouseReleased, removeConnectorListener, setup, snapToSite
 
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

ArcInteractor

public ArcInteractor(ArcManipulator m)
Create a new interactor to be used with the given manipulator.

Method Detail

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