public interface FigureContainer extends FigureSet, VisibleComponent
Yellow |
Modifier and Type | Method and Description |
---|---|
void |
add(Figure f)
Add a figure to this container.
|
boolean |
contains(Figure f)
Test if this container contains the given figure.
|
void |
decorate(Figure f,
FigureDecorator d)
Decorate a child figure, replacing the
child figure with the decorator.
|
int |
getFigureCount()
Return the number of figures in this container.
|
Figure |
pick(java.awt.geom.Rectangle2D region)
Given a rectangle, return the top-most descendent figure
that hits it.
|
Figure |
pick(java.awt.geom.Rectangle2D region,
Filter f)
Given a rectangle, return the top-most descendent figure
that hits it, and is accepted by the given filter.
|
void |
remove(Figure f)
Remove the given figure from this container.
|
void |
undecorate(FigureDecorator d)
Remove a figure from the given decorator and add
it back into this container.
|
figures, figuresFromBack, figuresFromFront
isVisible, paint, paint, setVisible
getParent, getTransformContext, repaint, repaint
void add(Figure f)
boolean contains(Figure f)
void decorate(Figure f, FigureDecorator d)
int getFigureCount()
Figure pick(java.awt.geom.Rectangle2D region)
Note that a region is given instead of a point so that "pick halo" can be implemented. The region should not have zero size, or no figure will be hit.
Figure pick(java.awt.geom.Rectangle2D region, Filter f)
Note that a region is given instead of a point so that "pick halo" can be implemented. The region should not have zero size, or no figure will be hit.
void remove(Figure f)
void undecorate(FigureDecorator d)