|
|||||||||
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
public abstract class Manipulator
A Manipulator is an object that decorates some figure, and generally paint grab-handles or some other stuff to the figure to that it can be resized and manipulated. This is an abstract class. Concrete subclasses implement particular kinds of manipulator.
Field Summary | |
---|---|
private GrabHandleFactory |
_factory
The factory that builds the grab handles. |
private java.util.ArrayList |
_grabHandles
The grab-handles that belong to this manipulator |
private DragInteractor |
_handleInteractor
The interactor for grab-handles |
private boolean |
_repainting
A nasty little flag that turns off child repaints |
Constructor Summary | |
---|---|
Manipulator()
|
Method Summary | |
---|---|
void |
addGrabHandle(GrabHandle gh)
Add a grab-handle to this manipulator's collection of grab-handles. |
void |
clearGrabHandles()
Clear all grab-handles. |
java.awt.geom.Rectangle2D |
getBounds()
Get the bounds. |
GrabHandleFactory |
getGrabHandleFactory()
Get the grab handle factory. |
DragInteractor |
getHandleInteractor()
Get the grab handle interactor. |
boolean |
isRepainting()
Test if this manipulator is in the process of repainting itself and its child. |
void |
paint(java.awt.Graphics2D g)
Paint the manipulator. |
Figure |
pick(java.awt.geom.Rectangle2D r)
Given a rectangle, return the top-most thing that hits it. |
abstract void |
refresh()
Refresh the geometry. |
void |
relocateGrabHandles()
Relocate grab-handles to their correct positions. |
void |
removeGrabHandle(GrabHandle gh)
Remove a grab-handle from this manipulator's collection of grab-handles. |
void |
repaint()
Request a repaint of the manipulator and child. |
void |
repaint(DamageRegion d)
Receive repaint notification. |
void |
repaintAlready()
Request a repaint of the manipulator and child. |
void |
setGrabHandleFactory(GrabHandleFactory factory)
Set the grab handle factory. |
void |
setHandleFilter(MouseFilter filter)
Set the mouse filter that is set in the grab handle interactor. |
void |
setHandleInteractor(DragInteractor interactor)
Set the grab handle interactor. |
void |
setRepainting(boolean repainting)
Set the repainting flag. |
Methods inherited from class diva.canvas.FigureDecorator |
---|
add, contains, figures, figuresFromBack, figuresFromFront, getChild, getContainer, getDecoratedFigure, getFigureCount, getShape, hit, newInstance, remove, replaceChild, setChild, 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 |
---|
private GrabHandleFactory _factory
private java.util.ArrayList _grabHandles
private DragInteractor _handleInteractor
private boolean _repainting
Constructor Detail |
---|
public Manipulator()
Method Detail |
---|
public void addGrabHandle(GrabHandle gh)
public void clearGrabHandles()
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface Figure
getBounds
in class FigureDecorator
public GrabHandleFactory getGrabHandleFactory()
public DragInteractor getHandleInteractor()
public boolean isRepainting()
public void paint(java.awt.Graphics2D g)
paint
in interface VisibleComponent
paint
in class FigureDecorator
public Figure pick(java.awt.geom.Rectangle2D r)
pick
in interface FigureContainer
pick
in class AbstractFigureContainer
public void removeGrabHandle(GrabHandle gh)
public void repaint(DamageRegion d)
repaint
in interface CanvasComponent
repaint
in class AbstractFigureContainer
public abstract void refresh()
public void relocateGrabHandles()
public void repaint()
repaint
in interface CanvasComponent
repaint
in class AbstractFigure
public void repaintAlready()
public void setGrabHandleFactory(GrabHandleFactory factory)
public void setHandleFilter(MouseFilter filter)
public void setHandleInteractor(DragInteractor interactor)
public void setRepainting(boolean repainting)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |