public static class FigureTutorial.CustomRectangle extends AbstractFigure
| Constructor and Description |
|---|
CustomRectangle(double x,
double y,
double width,
double height)
Create a new instance of this figure.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.geom.Rectangle2D |
getBounds()
Get the bounds of this figure.
|
java.awt.Shape |
getShape()
Get the shape of this figure.
|
void |
paint(java.awt.Graphics2D g)
Paint this figure onto the given graphics context.
|
void |
transform(java.awt.geom.AffineTransform at)
Transform the object.
|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible, translatepublic CustomRectangle(double x,
double y,
double width,
double height)
x - a doubley - a doublewidth - a doubleheight - a doublepublic java.awt.geom.Rectangle2D getBounds()
getBounds in interface FiguregetBounds in class AbstractFigurepublic java.awt.Shape getShape()
getShape in interface FiguregetShape in class AbstractFigurepublic void paint(java.awt.Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigureg - The 2D graphics object that this object
it to be painted upon.public void transform(java.awt.geom.AffineTransform at)
transform in interface Figuretransform in class AbstractFigureat - The transform to be used.