diva.canvas.connector
Class ArcManipulator

java.lang.Object
  extended by diva.canvas.AbstractFigure
      extended by diva.canvas.AbstractFigureContainer
          extended by diva.canvas.FigureDecorator
              extended by diva.canvas.interactor.Manipulator
                  extended by diva.canvas.connector.ConnectorManipulator
                      extended by diva.canvas.connector.ArcManipulator
All Implemented Interfaces:
CanvasComponent, Figure, FigureContainer, FigureSet, VisibleComponent, UserObjectContainer

public class ArcManipulator
extends ConnectorManipulator

A manipulator for arc connectors. In addition to the grab handles at the ends of the connector, it attaches a handle in the center of the connector so that the connector can be reshaped.

Version:
$Id: ArcManipulator.java 38798 2005-07-08 20:00:01Z cxh $
Author:
John Reekie, Edward A. Lee

Nested Class Summary
 
Nested classes/interfaces inherited from class diva.canvas.connector.ConnectorManipulator
ConnectorManipulator.TargetHighlighter
 
Field Summary
private  GrabHandle _midpointHandle
          The handle at the midpoint of the arc.
 
Fields inherited from class diva.canvas.connector.ConnectorManipulator
_connectorTarget, _layerMotionListener, _targetHighlighter, _targetProperty, _targetPropertyValue
 
Constructor Summary
ArcManipulator()
          Construct a new manipulator that uses rectangular grab-handles.
ArcManipulator(GrabHandleFactory f)
          Construct a new manipulator using the given grab-handle factory.
 
Method Summary
protected  void _createGrabHandles(Connector connector)
          Clear the current grab handles and create one for each of the head and tail sites, plus an additional one for the center of the arc.
 FigureDecorator newInstance(Figure f)
          Create a new instance of this manipulator.
 
Methods inherited from class diva.canvas.connector.ConnectorManipulator
addConnectorListener, addLayerMotionListener, getConnectorTarget, getHeadHandle, getSnapHalo, getTailHandle, getTargetHighlighter, refresh, removeConnectorListener, removeLayerMotionListener, setChild, setConnectorTarget, setSnapHalo, setTargetHighlighter, setTargetProperty
 
Methods inherited from class diva.canvas.interactor.Manipulator
addGrabHandle, clearGrabHandles, getBounds, getGrabHandleFactory, getHandleInteractor, isRepainting, paint, pick, relocateGrabHandles, removeGrabHandle, repaint, repaint, repaintAlready, setGrabHandleFactory, setHandleFilter, setHandleInteractor, setRepainting
 
Methods inherited from class diva.canvas.FigureDecorator
add, contains, figures, figuresFromBack, figuresFromFront, getChild, getContainer, getDecoratedFigure, getFigureCount, getShape, hit, remove, replaceChild, transform, translate
 
Methods inherited from class diva.canvas.AbstractFigureContainer
decorate, pick, undecorate
 
Methods inherited from class diva.canvas.AbstractFigure
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, setInteractor, setParent, setToolTipText, setUserObject, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface diva.canvas.VisibleComponent
isVisible, paint, setVisible
 
Methods inherited from interface diva.canvas.CanvasComponent
getParent, getTransformContext
 

Field Detail

_midpointHandle

private GrabHandle _midpointHandle
The handle at the midpoint of the arc.

Constructor Detail

ArcManipulator

public ArcManipulator()
Construct a new manipulator that uses rectangular grab-handles.


ArcManipulator

public ArcManipulator(GrabHandleFactory f)
Construct a new manipulator using the given grab-handle factory.

Method Detail

newInstance

public FigureDecorator newInstance(Figure f)
Create a new instance of this manipulator. The new instance will have the same grab handle, and interactor for grab-handles, as this one.

Overrides:
newInstance in class ConnectorManipulator

_createGrabHandles

protected void _createGrabHandles(Connector connector)
Clear the current grab handles and create one for each of the head and tail sites, plus an additional one for the center of the arc.

Overrides:
_createGrabHandles in class ConnectorManipulator
Parameters:
connector - The connector.