|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.EdgeRealizer
y.view.PolyLineEdgeRealizer
public class PolyLineEdgeRealizer
An edge realizer that displays an edge as a polyline. A polyline consists of a sequence of straight-line segments. The position of the bends determine the junction points of these segments. A special feature of this realizer is to draw a circular shaped edge path for self-loop edges that to no contain any bends.
| Field Summary |
|---|
| Fields inherited from class y.view.EdgeRealizer |
|---|
bends, path, PATH_CLIPPED_AT_SOURCE, PATH_CLIPPED_AT_SOURCE_AND_TARGET, PATH_CLIPPED_AT_TARGET, PATH_INVISBLE, PATH_UNCLIPPED |
| Constructor Summary | |
|---|---|
PolyLineEdgeRealizer()
Constructs a new PolyLineEdgeRealizer with no bends. |
|
PolyLineEdgeRealizer(EdgeRealizer er)
Constructs a new PolyLineEdgeRealizer as a copy of the given realizer. |
|
| Method Summary | |
|---|---|
protected byte |
calculatePath(Point2D sourceIntersectionOut,
Point2D targetIntersectionOut)
Calculates the visible path of this realizer. |
int |
containsSeg(double dx,
double dy)
like contains(), but returns number of the hit segment, 0 otherwise. |
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. |
boolean |
getSmoothedBends()
Returns whether or not to draw bends in a smoothed fashion. |
Bend |
insertBend(double x,
double y)
Adds a new bend to this realizer and returns it. |
boolean |
pathIntersects(Rectangle2D box,
boolean considerLabels)
This method complements the EdgeRealizer.contains(double,double) method. |
void |
read(ObjectInputStream in)
Deprecated. Use the GraphML format instead. |
void |
registerObstacles(BridgeCalculator calculator)
Calls calculator.registerObstacles(getPath().getPathIterator(null)); |
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 |
setSmoothedBends(boolean b)
Sets whether or not to draw bends in a smoothed fashion. |
void |
write(ObjectOutputStream out)
Deprecated. Use the GraphML format instead. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PolyLineEdgeRealizer()
public PolyLineEdgeRealizer(EdgeRealizer er)
| Method Detail |
|---|
public EdgeRealizer createCopy(EdgeRealizer er)
createCopy in class EdgeRealizerpublic void setSmoothedBends(boolean b)
public boolean getSmoothedBends()
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 neighbordir - 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 bendpublic Bend removeBend(Bend b)
removeBend in class EdgeRealizerb - Bend to be removed
public int containsSeg(double dx,
double dy)
containsSeg in class EdgeRealizer
public boolean pathIntersects(Rectangle2D box,
boolean considerLabels)
EdgeRealizerEdgeRealizer.contains(double,double) method.
Its primary use is for checking whether or not an edge lies within
the bounds of a selection box.
pathIntersects in class EdgeRealizerbox - the box that will be used for the intersection testconsiderLabels - if true, labels will be considered
protected byte calculatePath(Point2D sourceIntersectionOut,
Point2D targetIntersectionOut)
calculatePath in class EdgeRealizersourceIntersectionOut - targetIntersectionOut -
EdgeRealizer.PATH_UNCLIPPED, EdgeRealizer.PATH_CLIPPED_AT_SOURCE,
EdgeRealizer.PATH_CLIPPED_AT_TARGET, or EdgeRealizer.PATH_CLIPPED_AT_SOURCE_AND_TARGETEdgeRealizer.pathpublic void registerObstacles(BridgeCalculator calculator)
calculator.registerObstacles(getPath().getPathIterator(null));
registerObstacles in class EdgeRealizercalculator - the calculator instance used for the next rendering pass.
public void write(ObjectOutputStream out)
throws IOException
GraphML format instead.
write in class EdgeRealizerIOException
public void read(ObjectInputStream in)
throws IOException,
ClassNotFoundException
GraphML format instead.
write(ObjectOutputStream) method.
read in class EdgeRealizerIOException
ClassNotFoundException
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||