diva.canvas.interactor
Class PathManipulator

java.lang.Object
  extended bydiva.canvas.AbstractFigure
      extended bydiva.canvas.AbstractFigureContainer
          extended bydiva.canvas.FigureDecorator
              extended bydiva.canvas.interactor.Manipulator
                  extended bydiva.canvas.interactor.PathManipulator
All Implemented Interfaces:
CanvasComponent, Figure, FigureContainer, FigureSet, UserObjectContainer, VisibleComponent

public class PathManipulator
extends Manipulator

A manipulator which attaches grab handles to the sites of the child figure. It renders the grab handles and gives them a chance to intercept picks.

Version:
$Id: PathManipulator.java,v 1.7 2004/04/13 18:45:09 cxh Exp $
Author:
John Reekie, Michael Shilman

Constructor Summary
PathManipulator()
          Construct a new manipulator that uses rectangular grab-handles.
PathManipulator(GrabHandleFactory f)
          Construct a new manipulator using the given grab-handle factory.
 
Method Summary
 FigureDecorator newInstance(Figure f)
          Create a new instance of this manipulator.
 void refresh()
          Refresh the geometry.
 void setChild(Figure f)
          Set the child figure.
 
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
 

Constructor Detail

PathManipulator

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


PathManipulator

public PathManipulator(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.

Specified by:
newInstance in class FigureDecorator

refresh

public void refresh()
Refresh the geometry.

Specified by:
refresh in class Manipulator

setChild

public void setChild(Figure f)
Set the child figure. If we have any grab-handles, lose them. Then get a path geometry object set on this figure (the manipulator, not the child) and create grab-handles on it.

Overrides:
setChild in class FigureDecorator