|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--y.view.EdgeRealizer
|
+--y.view.BezierEdgeRealizer
This realizer draws an edge as a bezier spline curve. The bends are interpreted as controlpoints for the curve. The controlpoints of this curve type do not lie on the curve itself. Very 2nd segment (starting with the 3rd) formed by the control points is tangential to the curve at the point lying in the middle of that segment.
| Field Summary |
| Fields inherited from class y.view.EdgeRealizer |
bends, path |
| Constructor Summary | |
BezierEdgeRealizer()
Default Constructor. |
|
BezierEdgeRealizer(EdgeRealizer r)
Constrcts a new SplineEdgeRealizer as a copy of the given realizer. |
|
| Method Summary | |
protected void |
calculatePath()
Recalculates the bezier curve path after this realizer has been marked as dirty. |
void |
calcUnionRect(Rectangle2D r)
Calculate the union of rectangle enclosed by this realizer and r. |
boolean |
contains(double x,
double y)
Tests whether or not the given coordinate hits the path of this realizer. |
Bend |
createBend(double x,
double y,
Bend refBend,
int dir)
Add a new Bend to the edge |
EdgeRealizer |
createCopy(EdgeRealizer er)
Creates a copy of this realizer type that is initialized with the attributes of the given realizer. |
Bend |
insertBend(double x,
double y)
Adds a new bend to this realizer and returns it. |
protected void |
paintHighlightedBends(Graphics2D gfx)
Specialized paint method. |
void |
read(ObjectInputStream in)
Reads in the serialized form of this realizer. |
void |
reInsertBend(Bend bend,
Bend refBend,
int dir)
Reinserts a bend to the edge which had been removed before. |
Bend |
removeBend(Bend b)
Removes a Bend of this realizer |
void |
write(ObjectOutputStream out)
Writes out this realizer in a serialized form. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BezierEdgeRealizer()
public BezierEdgeRealizer(EdgeRealizer r)
| Method Detail |
public EdgeRealizer createCopy(EdgeRealizer er)
createCopy in class EdgeRealizer
public Bend createBend(double x,
double y,
Bend refBend,
int dir)
createBend in class EdgeRealizerx - X-coordinate of the Bendy - Y-coordinate of the BendrefBend - Bend which should be neighbourdir - indicates if the new Bend should be added before
(Graph.BEFORE) or after (Graph.AFTER) the refBend in
the bend sequence of the edge
public void reInsertBend(Bend bend,
Bend refBend,
int dir)
EdgeRealizer
reInsertBend in class EdgeRealizerbend - the bend to be reinsertedrefBend - reference bend already contained in this realizerdir - indicates whether the bend should be inserted before or after the
reference bend.Allowed values are Graph.AFTER and Graph.BEFORE.
public Bend insertBend(double x,
double y)
insertBend in class EdgeRealizerx - X-coordinates of the bendy - Y-coordinates of the bend
public boolean contains(double x,
double y)
contains in class EdgeRealizerpublic Bend removeBend(Bend b)
removeBend in class EdgeRealizerb - Bend to be removedprotected void calculatePath()
calculatePath in class EdgeRealizerEdgeRealizer.pathpublic void calcUnionRect(Rectangle2D r)
calcUnionRect in class EdgeRealizerprotected void paintHighlightedBends(Graphics2D gfx)
paintHighlightedBends in class EdgeRealizer
public void write(ObjectOutputStream out)
throws IOException
write in class EdgeRealizerIOException
public void read(ObjectInputStream in)
throws IOException,
ClassNotFoundException
BezierEdgeRealizer.write(ObjectOutputStream) method.
read in class EdgeRealizerIOException
ClassNotFoundException
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||