|
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.ArcEdgeRealizer
public class ArcEdgeRealizer
An edge realizer that displays an edge as an arc. Depending on the behavior of the radius of the arc, there are two possible modes for the realizer. In one mode the radius is always fixed independent of the distance of the two adjacent nodes, in the other mode the radius and the distance have a fixed ratio.
This realizer does have exactly one bend. Deleting or inserting bends does not have any effects.
| Field Summary | |
|---|---|
static byte |
FIXED_HEIGHT
Arc type specifier constant. |
static byte |
FIXED_RATIO
Arc type specifier constant. |
| 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 | |
|---|---|
ArcEdgeRealizer()
Instantiates a new ArcEdgeRealizer. |
|
ArcEdgeRealizer(byte type)
Instantiates a new ArcEdgeRealizer with a given arc type. |
|
ArcEdgeRealizer(EdgeRealizer er)
Instantiates a new ArcEdgeRealizer as a copy of the given edge realizer. |
|
| Method Summary | |
|---|---|
static Map |
arcTypeToStringMap()
Returns a map whose keys are the arc type constants wrapped in Byte objects. |
void |
bendChanged(Bend b,
double oldX,
double oldY)
Recalculates the arc path after the bend of this edge has been moved. |
protected byte |
calculatePath(Point2D sourceIntersectionPointOut,
Point2D targetIntersectionPointOut)
Recalculates the arc path after this realizer has been marked as dirty. |
void |
clearBends()
This implementation will not do anything since arcs will always have one single bend. |
Bend |
createBend(double x,
double y,
Bend refBend,
int dir)
Has no effect, because arcs have no bends. |
EdgeRealizer |
createCopy(EdgeRealizer er)
Creates a copy of this realizer type that is initialized with the attributes of the given realizer. |
byte |
getArcType()
Returns the arc type of this realizer. |
float |
getHeight()
Returns the height of the arc. |
int |
getMinBendCount()
Returns the minimal number of bends for this realizer, which is 1. |
float |
getRatio()
Returns the ratio between the distance of the end nodes of the edges and the height of the arc. |
Bend |
insertBend(double x,
double y)
Has no effect, because arcs have no bends |
void |
read(ObjectInputStream in)
Deprecated. Use the GraphML format instead. |
void |
reInsertBend(Bend bend,
Bend refBend,
int dir)
Has no effect, because arcs have no bends |
Bend |
removeBend(Bend b)
Has no effect, because arcs have no bends |
void |
setArcType(byte t)
Sets the arc type for this realizer. |
void |
setHeight(float h)
Sets the height of the arc. |
void |
setRatio(float r)
Sets the ratio between the distance of the end nodes of the edges and the height of the arc. |
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 |
| Field Detail |
|---|
public static final byte FIXED_HEIGHT
public static final byte FIXED_RATIO
| Constructor Detail |
|---|
public ArcEdgeRealizer()
FIXED_RATIO will be used as arc type.
public ArcEdgeRealizer(byte type)
FIXED_RATIO or FIXED_HEIGHT.
public ArcEdgeRealizer(EdgeRealizer er)
| Method Detail |
|---|
public void clearBends()
clearBends in class EdgeRealizerpublic EdgeRealizer createCopy(EdgeRealizer er)
createCopy in class EdgeRealizerpublic void setArcType(byte t)
t - Either FIXED_HEIGHT or FIXED_RATIOpublic byte getArcType()
FIXED_HEIGHT or FIXED_RATIOpublic float getRatio()
public void setRatio(float r)
public void setHeight(float h)
public float getHeight()
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
null.
public void reInsertBend(Bend bend,
Bend refBend,
int dir)
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
null.public Bend removeBend(Bend b)
removeBend in class EdgeRealizerb - Bend to be removedpublic int getMinBendCount()
getMinBendCount in class EdgeRealizer
public void bendChanged(Bend b,
double oldX,
double oldY)
bendChanged in class EdgeRealizerb - Bend which has changed positionoldX - previous x-coordinateoldY - previous y-coordinate
protected byte calculatePath(Point2D sourceIntersectionPointOut,
Point2D targetIntersectionPointOut)
calculatePath in class EdgeRealizersourceIntersectionPointOut - a Point2D instance that must be set by the implementation to point
to the source intersection point unless the path is empty.targetIntersectionPointOut - a Point2D instance that must be set by the implementation to point
to the target intersection point unless the path is empty.
EdgeRealizer.PATH_UNCLIPPED, EdgeRealizer.PATH_CLIPPED_AT_SOURCE,
EdgeRealizer.PATH_CLIPPED_AT_TARGET, or EdgeRealizer.PATH_CLIPPED_AT_SOURCE_AND_TARGETEdgeRealizer.path,
EdgeRealizer.isPathClippedAtSource(),
EdgeRealizer.isPathClippedAtTarget()public static Map arcTypeToStringMap()
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 | ||||||||