|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fcmodeler.view.figures.FilledRectangleHead
This is a class to draw a filled rectangle shape at the end of a connector.
The way the class works is almost similar with Arrowhead
. The
only different part is in its reshape() method. The _polygonValid variable
is removed here because it does not serve any purpose
Constructor Summary | |
FilledRectangleHead()
Creates the FilledRectangleHead at position (0,0) with
the normal angle (n = 0) |
|
FilledRectangleHead(double x,
double y,
double normal)
Creates the FilledRectangleHead at position (x,y) with
the angle at normal rad |
Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of this FilledRectangleHead . |
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)
Gets the connection point into the given point |
void |
getOrigin(java.awt.geom.Point2D p)
Gets the origin into the given point |
void |
paint(java.awt.Graphics2D g2D)
Paint the filled-rectangle-head. |
void |
reshape()
Recalculate the shape of the decoration |
void |
setFlipped(boolean flag)
Sets the flipped attribute of the FilledRectangleHead object |
void |
setNormal(double angle)
Sets the normal attribute of the FilledRectangleHead object |
void |
setOrigin(double x,
double y)
Sets the origin attribute of the FilledRectangleHead object |
java.lang.String |
toString()
Get the String representation for FilledRectangleHead |
void |
translate(double x,
double y)
Translate the origin by the given x and y coordinates |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FilledRectangleHead()
FilledRectangleHead
at position (0,0) with
the normal angle (n = 0)public FilledRectangleHead(double x, double y, double normal)
FilledRectangleHead
at position (x,y) with
the angle at normal radx
- x-coordinate of this FilledRectangleHead
objecty
- y-coordinate of this FilledRectangleHead
objectnormal
- the angle in radianMethod Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
FilledRectangleHead
. The returned
Object
is guaranteed to be of type FilledRectangleHead
and is also guaranteed to have copies of any mutable fields of this object.clone
in interface ConnectorEndExt
clone
in class java.lang.Object
FilledRectangleHead
object.java.lang.CloneNotSupportedException
- should never be thrown, as this class extends Object
and implements
Cloneable
by implementing ConnectorEndExt
.public void setNormal(double angle)
FilledRectangleHead
objectsetNormal
in interface diva.canvas.connector.ConnectorEnd
angle
- the new angle in radianpublic void setFlipped(boolean flag)
flag
- The new flipped valuepublic void setOrigin(double x, double y)
setOrigin
in interface diva.canvas.connector.ConnectorEnd
x
- The new x-coordinatey
- The new y-coordinatepublic java.awt.geom.Rectangle2D getBounds()
getBounds
in interface diva.canvas.connector.ConnectorEnd
public void getConnection(java.awt.geom.Point2D p)
getConnection
in interface diva.canvas.connector.ConnectorEnd
p
- the point of the connector endpublic void getOrigin(java.awt.geom.Point2D p)
getOrigin
in interface diva.canvas.connector.ConnectorEnd
p
- point of originpublic void reshape()
public void paint(java.awt.Graphics2D g2D)
paint
in interface diva.canvas.connector.ConnectorEnd
g2D
- the reference to a Graphics2D
objectpublic void translate(double x, double y)
translate
in interface diva.canvas.connector.ConnectorEnd
x
- x-coordinate of this FilledRectangleHead
objecty
- y-coordinate of this FilledRectangleHead
objectpublic java.lang.String toString()
FilledRectangleHead
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |