|
|||||||||
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
public abstract class AbstractFigureContainer
AbstractFigureContainer is an abstract class that roots the tree of figure-containing classes.
Yellow |
Constructor Summary | |
---|---|
AbstractFigureContainer()
|
Method Summary | |
---|---|
abstract boolean |
contains(Figure f)
Test if the given figure is a child of this composite. |
void |
decorate(Figure child,
FigureDecorator decorator)
Decorate a child figure, replacing the reference to the child figure with the decorator. |
abstract java.util.Iterator |
figures()
Return an iteration of the children, in an undefined order. |
abstract java.util.Iterator |
figuresFromBack()
Return an iteration of the children, from back to front. |
abstract java.util.Iterator |
figuresFromFront()
Return an iteration of the children, from front to back. |
abstract int |
getFigureCount()
Return the number of child figures in this container. |
void |
paint(java.awt.Graphics2D g)
Paint this composite figure onto a 2D graphics object. |
Figure |
pick(java.awt.geom.Rectangle2D region)
Given a rectangle, return the top-most descendent figure that it hits. |
Figure |
pick(java.awt.geom.Rectangle2D region,
Filter filter)
Given a rectangle, return the top-most descendent figure that it hits that is accepted by the given filter. |
void |
repaint(DamageRegion d)
Accept notification that a repaint has occurred somewhere in the hierarchy below this container. |
protected abstract void |
replaceChild(Figure child,
Figure replacement)
Replace the first figure with the second. |
void |
transform(java.awt.geom.AffineTransform at)
Transform this figure with the supplied transform. |
void |
translate(double x,
double y)
Translate this figure by the given distance. |
void |
undecorate(FigureDecorator decorator)
Remove a figure from the given decorator and add it back into this container. |
Methods inherited from class diva.canvas.AbstractFigure |
---|
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, paint, 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.FigureContainer |
---|
add, remove |
Methods inherited from interface diva.canvas.VisibleComponent |
---|
isVisible, paint, setVisible |
Methods inherited from interface diva.canvas.CanvasComponent |
---|
getParent, getTransformContext, repaint |
Constructor Detail |
---|
public AbstractFigureContainer()
Method Detail |
---|
public void decorate(Figure child, FigureDecorator decorator)
decorate
in interface FigureContainer
public abstract boolean contains(Figure f)
contains
in interface FigureContainer
contains
in interface FigureSet
public abstract java.util.Iterator figures()
figures
in interface FigureSet
public abstract java.util.Iterator figuresFromBack()
figuresFromBack
in interface FigureSet
public abstract java.util.Iterator figuresFromFront()
figuresFromFront
in interface FigureSet
public abstract int getFigureCount()
getFigureCount
in interface FigureContainer
public void paint(java.awt.Graphics2D g)
paint
in interface VisibleComponent
paint
in class AbstractFigure
public Figure pick(java.awt.geom.Rectangle2D region)
pick
in interface FigureContainer
public Figure pick(java.awt.geom.Rectangle2D region, Filter filter)
pick
in interface FigureContainer
public void repaint(DamageRegion d)
repaint
in interface CanvasComponent
repaint
in class AbstractFigure
protected abstract void replaceChild(Figure child, Figure replacement)
public void transform(java.awt.geom.AffineTransform at)
transform
in interface Figure
transform
in class AbstractFigure
public void translate(double x, double y)
translate
in interface Figure
translate
in class AbstractFigure
public void undecorate(FigureDecorator decorator)
undecorate
in interface FigureContainer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |