diva.canvas.interactor
Class CircleManipulator

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.interactor.CircleManipulator
All Implemented Interfaces:
CanvasComponent, Figure, FigureContainer, FigureSet, VisibleComponent, UserObjectContainer

public class CircleManipulator
extends Manipulator

A manipulator which attaches a grab handles to one of the bounds of the child figure. It renders the grab handle and gives it a chance to intercept picks.

Version:
$Revision: 1.5 $
Author:
Nick Zamora (nzamor@eecs.berkeley.edu)

Constructor Summary
CircleManipulator()
          Construct a new manipulator that uses rectangular grab-handles.
CircleManipulator(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 child)
          Set the child figure.
 void setDragInteractor(Interactor dragger)
          Set the drag interactor for figures wrapped by this manipulator.
 
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
 
Methods inherited from class diva.canvas.AbstractFigureContainer
decorate, pick, translate, 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

CircleManipulator

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


CircleManipulator

public CircleManipulator(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. This adjusts the bounds of the geometry to match the bounds of the child figure.

Specified by:
refresh in class Manipulator

setChild

public void setChild(Figure child)
Set the child figure. If we have a grab-handle, lose it. Then get a rectangle geometry object and create a grab-handle on one of its sites.

Overrides:
setChild in class FigureDecorator

setDragInteractor

public void setDragInteractor(Interactor dragger)
Set the drag interactor for figures wrapped by this manipulator. If set, the manipulator displays an additional handle that can be used to drag the figure. This is useful for certain types of figure that are outlines only.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.