Package diva.canvas.interactor
Class BasicGrabHandle
- java.lang.Object
-
- diva.canvas.AbstractFigure
-
- diva.canvas.toolbox.BasicFigure
-
- diva.canvas.toolbox.BasicRectangle
-
- diva.canvas.interactor.BasicGrabHandle
-
- All Implemented Interfaces:
CanvasComponent
,Figure
,GrabHandle
,ShapedFigure
,VisibleComponent
,UserObjectContainer
public class BasicGrabHandle extends BasicRectangle implements GrabHandle
A basic rectangle grab-handle implementation.- Version:
- $Id$
- Author:
- John Reekie, Michael Shilman
-
-
Constructor Summary
Constructors Constructor Description BasicGrabHandle(Site s)
Construct a new grab handle attached to the given site.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Site
getSite()
Get the site that this handle is attached tofloat
getSize()
Get the "size" of the grab-handle.void
relocate()
Reposition the grab-handle if necessaryvoid
setSite(Site s)
Set the set to which this grab-handle is attached.void
setSize(float size)
Set the "size" of the grab-handle.void
translate(double x, double y)
Translating a grab-handle moves its site, but _doesn't_ move the grab-handle itself (that will be handled by the reshape manipulator).-
Methods inherited from class diva.canvas.toolbox.BasicFigure
getBounds, getComposite, getDashArray, getFillPaint, getLineWidth, getOrigin, getRotation, getShape, getStrokePaint, hit, isCentered, paint, setCentered, setComposite, setDashArray, setFillPaint, setLineWidth, setPrototypeShape, setRotation, setShape, setStroke, setStrokePaint, transform
-
Methods inherited from class diva.canvas.AbstractFigure
contains, getInteractor, getLayer, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, 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.CanvasComponent
getTransformContext, repaint, repaint
-
Methods inherited from interface diva.canvas.Figure
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, hit, intersects, setInteractor, setParent, setToolTipText, transform
-
Methods inherited from interface diva.util.UserObjectContainer
getUserObject, setUserObject
-
Methods inherited from interface diva.canvas.VisibleComponent
isVisible, paint, paint, setVisible
-
-
-
-
Constructor Detail
-
BasicGrabHandle
public BasicGrabHandle(Site s)
Construct a new grab handle attached to the given site.
-
-
Method Detail
-
getSite
public Site getSite()
Get the site that this handle is attached to- Specified by:
getSite
in interfaceGrabHandle
-
getSize
public float getSize()
Get the "size" of the grab-handle. The size is half the length of each side. The default is 4.0.- Specified by:
getSize
in interfaceGrabHandle
-
relocate
public void relocate()
Reposition the grab-handle if necessary- Specified by:
relocate
in interfaceGrabHandle
-
setSite
public void setSite(Site s)
Set the set to which this grab-handle is attached.- Specified by:
setSite
in interfaceGrabHandle
-
setSize
public void setSize(float size)
Set the "size" of the grab-handle. The size is half the length of each side.- Specified by:
setSize
in interfaceGrabHandle
-
translate
public void translate(double x, double y)
Translating a grab-handle moves its site, but _doesn't_ move the grab-handle itself (that will be handled by the reshape manipulator).- Specified by:
translate
in interfaceFigure
- Overrides:
translate
in classBasicRectangle
- Parameters:
x
- The x value to be moved.y
- The y value to be moved.
-
-