|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.connector.Blob
public class Blob
An object that draws a blob of some kind on the end of a connector. The blob can be one of several styles, such as circle or diamond, and can either be draw filled or not. This is a low-level utility class, not a self-contained Figure.
Field Summary | |
---|---|
private java.awt.Paint |
_fillColor
The fill color. |
private boolean |
_filled
Flag that says whether the blob is filled or not |
private double |
_normal
The normal to the line |
private double |
_originX
x and y-origins |
private double |
_originY
|
private java.awt.Shape |
_shape
The shape to draw |
private boolean |
_shapeValid
A flag that says whether the shape is valid |
private int |
_style
The style. |
private double |
_unit
The size unit |
static int |
BLOB_CIRCLE
Specify a circle style |
static int |
BLOB_DIAMOND
Specify a diamond style |
java.awt.Stroke |
stroke
The stroke. |
Constructor Summary | |
---|---|
Blob()
Create a new circle blob at (0,0). |
|
Blob(double x,
double y,
double normal,
int style)
Create a new blob at the given coordinates and in the given style. |
|
Blob(double x,
double y,
double normal,
int style,
double size,
java.awt.Paint fillColor)
Create a new blob at the given coordinates and in the given style. |
|
Blob(int style)
Create a new blob at (0,0) in the given style. |
Method Summary | |
---|---|
java.awt.geom.Rectangle2D |
getBounds()
Get the bounding box of the shape used to draw this connector end. |
void |
getConnection(java.awt.geom.Point2D p)
Get the connection point into the given point |
void |
getOrigin(java.awt.geom.Point2D p)
Get the origin into the given point. |
double |
getSizeUnit()
Get the size unit. |
int |
getStyle()
Get the style. |
boolean |
isFilled()
Test if the blob is filled or not. |
void |
paint(java.awt.Graphics2D g)
Paint the blob. |
void |
reshape()
Recalculate the shape of the blob. |
void |
setFilled(boolean flag)
Set the flag that determines whether to fill the blob. |
void |
setNormal(double angle)
Set the normal of the blob. |
void |
setOrigin(double x,
double y)
Set the end-point of the blob. |
void |
setSizeUnit(double s)
Set the size unit. |
void |
setStyle(int s)
Set the style. |
void |
translate(double x,
double y)
Translate the origin by the given amount. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BLOB_CIRCLE
public static final int BLOB_DIAMOND
private int _style
private double _unit
private java.awt.Paint _fillColor
private boolean _filled
private double _originX
private double _originY
private double _normal
private java.awt.Shape _shape
private boolean _shapeValid
public java.awt.Stroke stroke
Constructor Detail |
---|
public Blob()
public Blob(int style)
public Blob(double x, double y, double normal, int style)
public Blob(double x, double y, double normal, int style, double size, java.awt.Paint fillColor)
Method Detail |
---|
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface ConnectorEnd
public void getConnection(java.awt.geom.Point2D p)
getConnection
in interface ConnectorEnd
public void getOrigin(java.awt.geom.Point2D p)
getOrigin
in interface ConnectorEnd
public double getSizeUnit()
public int getStyle()
public boolean isFilled()
public void paint(java.awt.Graphics2D g)
paint
in interface ConnectorEnd
public void reshape()
public void setFilled(boolean flag)
public void setNormal(double angle)
setNormal
in interface ConnectorEnd
public void setOrigin(double x, double y)
setOrigin
in interface ConnectorEnd
public void setSizeUnit(double s)
public void setStyle(int s)
public void translate(double x, double y)
translate
in interface ConnectorEnd
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |