|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fcmodeler.view.figures.DiamondNodeShape
A NodeShape
implementation providing a diamond node shape.
DiamondNodeShape
uses a GeneralPath
as its
Shape
object.
Constructor Summary | |
DiamondNodeShape()
Creates a new DiamondNodeShape inside a rectangle (0, 0, 4, 4) |
|
DiamondNodeShape(double x,
double y,
double w,
double h)
Creates a new DiamondNodeShape inside a rectangle (x, y, w, h) |
Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of this DiamondNodeShape . |
void |
enclose(java.awt.geom.Rectangle2D rectangle)
Ensures that this DiamondNodeShape completely encloses the specified
rectangle. |
java.awt.Shape |
getShape()
Returns the Shape object represented by this DiamondNodeShape . |
void |
position(double x,
double y)
Positions this DiamondNodeShape at the specified coordinates. |
java.lang.String |
toString()
The String representation of this DiamondNodeShape object |
void |
transform(java.awt.geom.AffineTransform at)
Transforms this DiamondNodeShape using the specified AffineTransform . |
void |
translate(double dx,
double dy)
Translates this DiamondNodeShape by the specified x and y values. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DiamondNodeShape()
public DiamondNodeShape(double x, double y, double w, double h)
x
- x-coordinate of this DiamondNodeShape
.y
- y-coordinate of this DiamondNodeShape
.w
- width of this DiamondNodeShape
.h
- height of this DiamondNodeShape
.Method Detail |
public java.awt.Shape getShape()
Shape
object represented by this DiamondNodeShape
.getShape
in interface NodeShape
Shape
object represented by this DiamondNodeShape
.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
DiamondNodeShape
. The returned
Object
is guaranteed to be of type DiamondNodeShape
and is also guaranteed to have copies of any mutable fields of this object.clone
in interface NodeShape
clone
in class java.lang.Object
DiamondNodeShape
object.java.lang.CloneNotSupportedException
- should never be thrown, as this class extends Object
and implements
Cloneable
by implementing NodeShape
.public void translate(double dx, double dy)
DiamondNodeShape
by the specified x and y values. Note that calling
this method may create a new Shape
instance. Therefore, a new call
to getShape
may be necessary after calling this method.translate
in interface NodeShape
dx
- the amount to translate in the x direction.dy
- the amount to translate in the y direction.public void transform(java.awt.geom.AffineTransform at)
Transforms this DiamondNodeShape
using the specified AffineTransform
.
Note that calling this method may create a new Shape
instance. Therefore,
a new call to getShape
may be necessary after calling this method.
This method currently throws an UnsupportedOperationException
until a further research is done on whether AffineTransform
will work with
GeneralPath
.
transform
in interface NodeShape
transform
- the AffineTransform
used to transform this DiamondNodeShape
object.public void enclose(java.awt.geom.Rectangle2D rectangle)
DiamondNodeShape
completely encloses the specified
rectangle.enclose
in interface NodeShape
rectangle
- the rectangle to enclose.public void position(double x, double y)
DiamondNodeShape
at the specified coordinates. Note that calling
this method may create a new Shape
instance. Therefore, a new call
to getShape
may be necessary after calling this method.position
in interface NodeShape
x
- the x-coordinate of the new position.y
- the y-coordinate of the new position.public java.lang.String toString()
DiamondNodeShape
objecttoString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |