Class 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$
    Author:
    Edward A. Lee
    • Constructor Detail

      • ArcInteractor

        public ArcInteractor​(ArcManipulator m)
        Create a new interactor to be used with the given manipulator.
        Parameters:
        m - The given manipulator
    • Method Detail

      • fireConnectorEvent

        protected void fireConnectorEvent​(int id)
        Fire a connector event to all connector listeners.
        Overrides:
        fireConnectorEvent in class ConnectorInteractor
        Parameters:
        id - The id
      • 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
        Parameters:
        e - The event
        dx - The change in x
        dy - The change in y