|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.AbstractFigure
diva.canvas.FigureWrapper
public abstract class FigureWrapper
A FigureWrapper is a figure container that contains a single child figure. The purpose of a FigureWrapper is to provide an abstract superclass for application-specific figures, that need to implement certain behaviour but don't particularly care about their appearance.
Yellow |
Field Summary | |
---|---|
private Figure |
_child
The child |
Constructor Summary | |
---|---|
FigureWrapper(Figure f)
Construct a new figure with the given child figure. |
Method Summary | |
---|---|
java.awt.geom.Rectangle2D |
getBounds()
Get the bounds of the child figure. |
Figure |
getChild()
Get the child figure, or null if there isn't one. |
java.awt.Shape |
getShape()
Get the outline shape of the child figure. |
void |
paint(java.awt.Graphics2D g)
Paint the child if this figure is visible. |
void |
setChild(Figure f)
Set the child figure. |
void |
transform(java.awt.geom.AffineTransform at)
Transform the child figure with the supplied transform. |
Methods inherited from class diva.canvas.AbstractFigure |
---|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible, translate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Figure _child
Constructor Detail |
---|
public FigureWrapper(Figure f)
Method Detail |
---|
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface Figure
getBounds
in class AbstractFigure
public Figure getChild()
public java.awt.Shape getShape()
getShape
in interface Figure
getShape
in class AbstractFigure
public void paint(java.awt.Graphics2D g)
paint
in interface VisibleComponent
paint
in class AbstractFigure
public void setChild(Figure f)
public void transform(java.awt.geom.AffineTransform at)
transform
in interface Figure
transform
in class AbstractFigure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |