|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.AbstractFigure
diva.canvas.AbstractFigureContainer
diva.canvas.FigureDecorator
diva.canvas.interactor.Manipulator
diva.canvas.connector.ConnectorManipulator
public class ConnectorManipulator
A manipulator which attaches grab handles to the ends of a connector. The interactor given to the grab-handles determines the behaviour of the grab-handles.
Nested Class Summary | |
---|---|
(package private) static class |
ConnectorManipulator.TargetHighlighter
|
Field Summary | |
---|---|
(package private) ConnectorTarget |
_connectorTarget
The thing that we use to find sites |
private GrabHandle |
_headHandle
The handle at the connector head. |
(package private) LayerMotionListener |
_layerMotionListener
Layer motion listeners |
private double |
_snapHalo
The snap halo |
private GrabHandle |
_tailHandle
The handle at the connector tail. |
(package private) LayerMotionListener |
_targetHighlighter
The highlighter listener |
(package private) java.lang.String |
_targetProperty
The property name that is tested to see if a figure is a possible drop target. |
(package private) java.lang.String |
_targetPropertyValue
The value of the property that is tested to see if a figure is a possible drop target. |
Constructor Summary | |
---|---|
ConnectorManipulator()
Construct a new manipulator that uses rectangular grab-handles. |
|
ConnectorManipulator(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. |
void |
addConnectorListener(ConnectorListener l)
Add a connector listener to the interactor that is attached to grab-handles. |
void |
addLayerMotionListener(LayerMotionListener l)
Add the given layer motion listener to this interactor. |
ConnectorTarget |
getConnectorTarget()
Get the connector target |
GrabHandle |
getHeadHandle()
Get the head handle |
double |
getSnapHalo()
Get the snap halo. |
GrabHandle |
getTailHandle()
Get the tail handle |
LayerMotionListener |
getTargetHighlighter()
Get the listener that highlights target objects. |
FigureDecorator |
newInstance(Figure f)
Create a new instance of this manipulator. |
void |
refresh()
Refresh the geometry. |
void |
removeConnectorListener(ConnectorListener l)
Remove a connector listener from the interactor that is attached to grab-handles. |
void |
removeLayerMotionListener(LayerMotionListener l)
Remove the given layer motion listener from this interactor. |
void |
setChild(Figure f)
Set the child figure. |
void |
setConnectorTarget(ConnectorTarget t)
Set the connector target object |
void |
setSnapHalo(double halo)
Set the snap halo. |
void |
setTargetHighlighter(LayerMotionListener l)
Set the listener that highlights target objects. |
void |
setTargetProperty(java.lang.String key,
java.lang.String value)
Set the drop target property and value. |
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 |
---|
LayerMotionListener _layerMotionListener
ConnectorTarget _connectorTarget
private double _snapHalo
LayerMotionListener _targetHighlighter
java.lang.String _targetProperty
java.lang.String _targetPropertyValue
private GrabHandle _headHandle
private GrabHandle _tailHandle
Constructor Detail |
---|
public ConnectorManipulator()
public ConnectorManipulator(GrabHandleFactory f)
Method Detail |
---|
public void addConnectorListener(ConnectorListener l)
public void addLayerMotionListener(LayerMotionListener l)
public ConnectorTarget getConnectorTarget()
public GrabHandle getHeadHandle()
public GrabHandle getTailHandle()
public double getSnapHalo()
public LayerMotionListener getTargetHighlighter()
public FigureDecorator newInstance(Figure f)
newInstance
in class FigureDecorator
public void removeConnectorListener(ConnectorListener l)
public void removeLayerMotionListener(LayerMotionListener l)
public void refresh()
refresh
in class Manipulator
public void setChild(Figure f)
setChild
in class FigureDecorator
public void setConnectorTarget(ConnectorTarget t)
public void setSnapHalo(double halo)
public void setTargetHighlighter(LayerMotionListener l)
public void setTargetProperty(java.lang.String key, java.lang.String value)
protected void _createGrabHandles(Connector connector)
connector
- The connector.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |