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, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, remove
isVisible, paint, setVisible
getParent, getTransformContext, repaint
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 Iterator figures()
public abstract Iterator figuresFromBack()
figuresFromBack
in interface FigureSet
public abstract Iterator figuresFromFront()
figuresFromFront
in interface FigureSet
public abstract int getFigureCount()
getFigureCount
in interface FigureContainer
public void paint(Graphics2D g)
paint
in interface VisibleComponent
paint
in class AbstractFigure
public Figure pick(Rectangle2D region)
pick
in interface FigureContainer
public Figure pick(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(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
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.