public abstract class AbstractFigureContainer extends AbstractFigure implements FigureContainer
| Constructor and Description |
|---|
AbstractFigureContainer() |
| Modifier and Type | Method and Description |
|---|---|
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 Iterator |
figures()
Return an iteration of the children, in an undefined order.
|
abstract Iterator |
figuresFromBack()
Return an iteration of the children, from
back to front.
|
abstract 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(Graphics2D g)
Paint this composite figure onto a 2D graphics object.
|
Figure |
pick(Rectangle2D region)
Given a rectangle, return the top-most descendent figure
that it hits.
|
Figure |
pick(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(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.
|
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, paint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, removeisVisible, paint, setVisiblegetParent, getTransformContext, repaintpublic void decorate(Figure child, FigureDecorator decorator)
decorate in interface FigureContainerpublic abstract boolean contains(Figure f)
contains in interface FigureContainercontains in interface FigureSetpublic abstract Iterator figures()
public abstract Iterator figuresFromBack()
figuresFromBack in interface FigureSetpublic abstract Iterator figuresFromFront()
figuresFromFront in interface FigureSetpublic abstract int getFigureCount()
getFigureCount in interface FigureContainerpublic void paint(Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigurepublic Figure pick(Rectangle2D region)
pick in interface FigureContainerpublic Figure pick(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(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 FigureContainerCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.