public class StateBubble extends AbstractFigure
Modifier and Type | Field and Description |
---|---|
static int |
FINAL_STATE
The style of a finalstate
|
static int |
INITIAL_STATE
The style of an initial state
|
static int |
NORMAL_STATE
The style of a regular state
|
Constructor and Description |
---|
StateBubble(double x,
double y,
double width,
double height)
Create a new figure at the given coordinates.
|
StateBubble(double x,
double y,
double width,
double height,
java.awt.Paint fill)
Create a new figure at the given coordinates and with the
given fill.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Rectangle2D |
getBounds()
Get the bounding box of this figure.
|
java.awt.Shape |
getShape()
Get the shape of this figure.
|
int |
getStateType()
Get the state type.
|
java.awt.Stroke |
getStroke()
Get the stroke of this figure.
|
java.awt.Paint |
getStrokePaint()
Get the stroke paint pattern of this figure.
|
boolean |
hit(java.awt.geom.Rectangle2D r)
Test if this figure intersects the given rectangle.
|
void |
paint(java.awt.Graphics2D g)
Paint the figure.
|
void |
setFillPaint(java.awt.Paint p)
Set the fill paint pattern of this figure.
|
void |
setStateType(int type)
Set the type of the state
|
void |
setStroke(java.awt.BasicStroke s)
Set the stroke of this figure.
|
void |
setStrokePaint(java.awt.Paint p)
Set the stroke paint pattern of this figure.
|
void |
transform(java.awt.geom.AffineTransform at)
Transform the figure with the supplied transform.
|
void |
translate(double x,
double y)
Translate the figure with by the given distance.
|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible
public static final int NORMAL_STATE
public static final int INITIAL_STATE
public static final int FINAL_STATE
public StateBubble(double x, double y, double width, double height)
public StateBubble(double x, double y, double width, double height, java.awt.Paint fill)
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 int getStateType()
public java.awt.Stroke getStroke()
public java.awt.Paint getStrokePaint()
public boolean hit(java.awt.geom.Rectangle2D r)
hit
in interface Figure
hit
in class AbstractFigure
r
- The rectangle to be checked.public void paint(java.awt.Graphics2D g)
paint
in interface VisibleComponent
paint
in class AbstractFigure
g
- The 2D graphics object that this object
it to be painted upon.public void setFillPaint(java.awt.Paint p)
public void setStroke(java.awt.BasicStroke s)
public void setStateType(int type)
public void setStrokePaint(java.awt.Paint p)
public void transform(java.awt.geom.AffineTransform at)
transform
in interface Figure
transform
in class AbstractFigure
at
- The transform to be used.public void translate(double x, double y)
translate
in interface Figure
translate
in class AbstractFigure
x
- The x value to be moved.y
- The y value to be moved.