uk.ac.starlink.diva
Class RangeManipulator

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.BoundsManipulator
                      extended by uk.ac.starlink.diva.RangeManipulator
All Implemented Interfaces:
CanvasComponent, Figure, FigureContainer, FigureSet, VisibleComponent, UserObjectContainer

public class RangeManipulator
extends BoundsManipulator

A manipulator which attaches grab handles to the vertical or horizontal bounds of a figure. The natural figure movements supported are vertical or horizontal movement and resizing.

Version:
$Id$
Author:
Peter W. Draper

Field Summary
 
Fields inherited from class diva.canvas.interactor.BoundsManipulator
_dragInteractor, _geometry
 
Constructor Summary
RangeManipulator()
          Construct a new manipulator that uses rectangular grab-handles.
RangeManipulator(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 setChild(Figure child)
          Set the child figure.
 
Methods inherited from class diva.canvas.interactor.BoundsManipulator
getGeometry, refresh, setDragInteractor
 
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

RangeManipulator

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


RangeManipulator

public RangeManipulator(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 interaction role for grab-handles, as this one.

Overrides:
newInstance in class BoundsManipulator

setChild

public void setChild(Figure child)
Set the child figure. If we have any grab-handles, lose them. Then get a rectangle geometry object and create grab-handles on its sites. Override to modify Geometry object, so we can match "range" rather than "bounds" handles.

Overrides:
setChild in class BoundsManipulator


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