A Figure is a persistent object drawn on the screen.
This interface roots a small tree of interfaces that define
various roles that different kinds of figures play. It is also
implemented by the AbstractFigure class, which roots the tree
of concrete figure classes.
Get the most immediate layer containing this figure.
the most immediate layer containing this figure.
Return the origin of the figure in the enclosing transform
context. This might be, for example, the center of the figure,
the upper left corner, or some other point with respect to which
the pieces of the figure are defined.
Return the parent of this figure. Return null if the figure
does not have a parent. (Note that a figure with no parent
can exist, but it will not be displayed, as it must be in a
layer for the figure canvas to ever call its paint method.)
Test if this figure is "hit" by the given rectangle. This is the
same as intersects if the interior of the figure is not
transparent. The rectangle is given in the enclosing transform context.
If the figure is not visible, it must return false.
The default implementation is the same as intersects
if the figure is visible.
(This method would be better named hits, but
the name hit is consistent with java.awt.Graphics2D.)
Set the parent of this figure. A null argument means that the
figure is being removed from its parent. No checks are performed
to see if the figure already has a parent -- it is the
responsibility of the caller to do this. This method is not intended
for public use, and should never be called by client code.