|
|||||||||
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.toolbox.PaintedFigure
public class PaintedFigure
A PaintedFigure is contains an arbitrary set of PaintedObjects in a list. This figure can be used for constructing more complex figures than classes such as BasicFigure. It contains a transform that is used for scaling the contained painted objects. (Note that, if using this class to construct a figure from an external source, the initial transform should operate on the coordinates only.)
Field Summary | |
---|---|
private java.awt.Composite |
_composite
The color compositing operator |
private PaintedList |
_paintedList
The list containing the objects that we paint |
private java.awt.geom.AffineTransform |
_transform
The transform for the internals |
Constructor Summary | |
---|---|
PaintedFigure()
Create a new blank figure. |
|
PaintedFigure(PaintedList objects)
Create a new figure that paints itself using the given PaintedList. |
Method Summary | |
---|---|
void |
add(PaintedObject po)
Add a new painted object to the objects displayed by this figure. |
java.awt.geom.Rectangle2D |
getBounds()
Get the bounding box of this figure. |
java.awt.Composite |
getComposite()
Get the color composition operator of this figure. |
java.awt.geom.Point2D |
getOrigin()
Return the origin, which is the point relative to which all of the contained objects are drawn. |
PaintedList |
getPaintedList()
Get the painted list of painted objects of this figure. |
java.awt.Shape |
getShape()
Get the shape of this figure. |
void |
paint(java.awt.Graphics2D g)
Paint the figure. |
void |
setComposite(java.awt.Composite c)
Set the color composition operator of this figure. |
void |
transform(java.awt.geom.AffineTransform at)
Transform the figure with the supplied transform. |
Methods inherited from class diva.canvas.AbstractFigure |
---|
contains, getInteractor, getLayer, 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 java.awt.Composite _composite
private java.awt.geom.AffineTransform _transform
private PaintedList _paintedList
Constructor Detail |
---|
public PaintedFigure()
public PaintedFigure(PaintedList objects)
Method Detail |
---|
public void add(PaintedObject po)
public PaintedList getPaintedList()
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface Figure
getBounds
in class AbstractFigure
public java.awt.geom.Point2D getOrigin()
getOrigin
in interface Figure
getOrigin
in class AbstractFigure
AbstractFigure.getBounds()
public java.awt.Shape getShape()
getShape
in interface Figure
getShape
in class AbstractFigure
public java.awt.Composite getComposite()
public void paint(java.awt.Graphics2D g)
paint
in interface VisibleComponent
paint
in class AbstractFigure
public void setComposite(java.awt.Composite c)
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 |