public class GraphView.VisualEdge extends java.lang.Object implements Serializable
Edge
.
Modifier and Type | Method and Description |
---|---|
void |
deserialize(Serializer s)
Deserializes (loads) the object data from the given serializer.
|
boolean |
dockTo(GraphView.VisualVertex v)
Indicates if the edge docks to the given vertex that means if
v == getPredecessor() || v == getSuccessor() . |
void |
ensureVisibility()
Ensures that the edge is in the visible area of the graph.
|
java.awt.Color |
getColor()
Gets the color of the edge.
|
E |
getEdge()
Gets the edge.
|
int |
getIndex()
Gets the index of the edge in the list of edges.
|
int |
getLabelX()
Gets the x position of the edge label.
|
int |
getLabelY()
Gets the y position of the edge label.
|
int |
getLineWidth()
Gets the line width of the edge.
|
int |
getOffsetIndex()
Gets the offset index of the edge.
|
GraphView.VisualVertex |
getPredecessor()
Gets the predecessor of the edge.
|
CatmullRomSpline |
getSpline()
Gets the spline of the edge that represents the edge visually.
|
GraphView.VisualVertex |
getSuccessor()
Gets the successor of the edge.
|
int |
getSupportX()
Gets the x position of the support point.
|
int |
getSupportY()
Gets the y position of the support point.
|
int |
getX1()
Gets x position of the first coordinate that docks the line of the edge to the predecessor.
|
int |
getX2()
Gets x position of the second coordinate that docks the line of the edge to the successor.
|
int |
getY1()
Gets y position of the first coordinate that docks the line of the edge to the predecessor.
|
int |
getY2()
Gets y position of the second coordinate that docks the line of the edge to the successor.
|
boolean |
isSelected()
Indicates if the edge is currently selected.
|
boolean |
isVisible()
Indicates if the edge is currently inside the visible area of the graph.
|
void |
serialize(Serializer s)
Serializes (saves) the object data to the given serializer.
|
void |
setColor(java.awt.Color c)
Sets the color of the edge.
|
void |
setLineWidth(int w)
Sets the line width of the edge.
|
java.lang.String |
toString()
Gets the string representation of the visual edge.
|
public final E getEdge()
public final GraphView.VisualVertex getPredecessor()
public final GraphView.VisualVertex getSuccessor()
public final int getIndex()
public final int getOffsetIndex()
public final java.awt.Color getColor()
public final void setColor(java.awt.Color c) throws java.lang.IllegalArgumentException
GraphView.setAutoRepaint(boolean)
)!c
- the colorjava.lang.IllegalArgumentException
- public final int getLineWidth()
public final void setLineWidth(int w) throws java.lang.IllegalArgumentException
GraphView.setAutoRepaint(boolean)
)!w
- the line widthjava.lang.IllegalArgumentException
- w < 1
public final int getX1()
public final int getY1()
public final int getX2()
public final int getY2()
public final int getSupportX()
public final int getSupportY()
public final int getLabelX()
public final int getLabelY()
public final boolean isVisible()
true
if edge is visible otherwise false
public final boolean dockTo(GraphView.VisualVertex v)
v == getPredecessor() || v == getSuccessor()
.
v
- the vertextrue
if the edge docks to the vertex otherwise false
public final CatmullRomSpline getSpline()
public final boolean isSelected()
true
if edge is selected otherwise false
public final void ensureVisibility()
public java.lang.String toString()
(predecessor.toString(), successor.toString())
.toString
in class java.lang.Object
public void serialize(Serializer s)
Serializable
serialize
in interface Serializable
s
- the serializer for the objectpublic void deserialize(Serializer s)
Serializable
deserialize
in interface Serializable
s
- the serializer