|
|||||||||
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.tutorial.TransformedFigureTutorial.CloudFigure
public static class TransformedFigureTutorial.CloudFigure
CloudFigure is a class that paints itself as a translucent "cloud." This example figure class illustrates the use of different paints and strokes to create the required image, and the use of TransformContext to position that image.
Field Summary | |
---|---|
private java.awt.geom.Rectangle2D |
_cachedBounds
|
private java.awt.Shape |
_cachedShape
|
private java.awt.Shape |
_cloud1
|
private java.awt.Shape |
_cloud2
|
private java.awt.Shape |
_shape
|
private TransformContext |
_transformContext
|
Constructor Summary | |
---|---|
TransformedFigureTutorial.CloudFigure(double x,
double y,
double width,
double height)
Create a new instance of this figure. |
Method Summary | |
---|---|
java.awt.geom.Rectangle2D |
getBounds()
Get the bounds of this figure. |
java.awt.Shape |
getShape()
Get the shape of this figure. |
TransformContext |
getTransformContext()
Get the transform context. |
void |
paint(java.awt.Graphics2D g)
Paint this figure onto the given graphics context. |
void |
transform(java.awt.geom.AffineTransform at)
Transform the object. |
Methods inherited from class diva.canvas.AbstractFigure |
---|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, 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 java.awt.Shape _shape
private java.awt.Shape _cloud1
private java.awt.Shape _cloud2
private TransformContext _transformContext
private java.awt.geom.Rectangle2D _cachedBounds
private java.awt.Shape _cachedShape
Constructor Detail |
---|
public TransformedFigureTutorial.CloudFigure(double x, double y, double width, double height)
Method Detail |
---|
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface Figure
getBounds
in class AbstractFigure
public java.awt.Shape getShape()
getShape
in interface Figure
getShape
in class AbstractFigure
public TransformContext getTransformContext()
getTransformContext
in interface CanvasComponent
getTransformContext
in class AbstractFigure
public void paint(java.awt.Graphics2D g)
paint
in interface VisibleComponent
paint
in class AbstractFigure
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 |