|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fcmodeler.view.figures.EllipseNodeShape
A NodeShape
implementation providing an ellipse node shape.
EllipseNodeShape
uses an Ellipse2D.Double
as its
Shape
object.
Constructor Summary | |
EllipseNodeShape()
Creates a new EllipseNodeShape with coordinates (0,0), zero width, and zero height. |
|
EllipseNodeShape(double x,
double y,
double w,
double h)
Creates a new EllipseNodeShape with the specified coordinates, width, and height. |
Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of this EllipseNodeShape . |
void |
enclose(java.awt.geom.Rectangle2D rectangle)
Ensures that this EllipseNodeShape completely encloses the specified
rectangle. |
java.awt.Shape |
getShape()
Returns the Shape object represented by this EllipseNodeShape . |
void |
position(double x,
double y)
Positions this EllipseNodeShape at the specified coordinates. |
java.lang.String |
toString()
|
void |
transform(java.awt.geom.AffineTransform transform)
Transforms this EllipseNodeShape using the specified AffineTransform . |
void |
translate(double dx,
double dy)
Translates this NodeShEllipseNodeShapeape 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 EllipseNodeShape()
public EllipseNodeShape(double x, double y, double w, double h)
x
- the x-coordinate of this EllipseNodeShape
.y
- the y-coordinate of this EllipseNodeShape
.w
- the width of this EllipseNodeShape
.h
- the height of this EllipseNodeShape
.Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
EllipseNodeShape
. The returned
Object
is guaranteed to be of type EllipseNodeShape
and is also guaranteed to have copies of any mutable fields of this object.clone
in interface NodeShape
clone
in class java.lang.Object
EllipseNodeShape
.java.lang.CloneNotSupportedException
- should never be thrown, as this class extends Object
and implements
Cloneable
by implementing NodeShape
.public void enclose(java.awt.geom.Rectangle2D rectangle)
EllipseNodeShape
completely encloses the specified
rectangle.enclose
in interface NodeShape
rectangle
- the rectangle to enclose.public java.awt.Shape getShape()
Shape
object represented by this EllipseNodeShape
.getShape
in interface NodeShape
Shape
object represented by this EllipseNodeShape
.public void position(double x, double y)
EllipseNodeShape
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()
toString
in class java.lang.Object
public void transform(java.awt.geom.AffineTransform transform)
EllipseNodeShape
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.transform
in interface NodeShape
transform
- the AffineTransform
used to transform the Shape
object.public void translate(double dx, double dy)
NodeShEllipseNodeShapeape
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 the x direction.dy
- the amount to translate in the y direction.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |