|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object extended bydiva.canvas.AbstractFigure extended bydiva.canvas.AbstractFigureContainer
AbstractFigureContainer is an abstract class that roots the tree of figure-containing classes.
| 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 FigureContainerpublic abstract boolean contains(Figure f)
contains in interface FigureContainerpublic abstract java.util.Iterator figures()
public abstract java.util.Iterator figuresFromBack()
figuresFromBack in interface FigureSetpublic abstract java.util.Iterator figuresFromFront()
figuresFromFront in interface FigureSetpublic abstract int getFigureCount()
getFigureCount in interface FigureContainerpublic void paint(java.awt.Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigurepublic Figure pick(java.awt.geom.Rectangle2D region)
pick in interface FigureContainerpublic Figure pick(java.awt.geom.Rectangle2D region, Filter filter)
pick in interface FigureContainerpublic void repaint(DamageRegion d)
repaint in interface CanvasComponentrepaint in class AbstractFigureprotected abstract void replaceChild(Figure child, Figure replacement)
public void transform(java.awt.geom.AffineTransform at)
transform in interface Figuretransform in class AbstractFigurepublic void translate(double x, double y)
translate in interface Figuretranslate in class AbstractFigurepublic 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 | |||||||||