VertexType
- the type of the vertices of the graphEdgeType
- the type of the edges of the graphpublic abstract class EdgeVisualData<VertexType,EdgeType> extends java.lang.Object implements EdgeArealData
Modifier and Type | Field and Description |
---|---|
protected Vector2D |
direction |
protected Position2D |
endPosition |
protected EdgeType |
originalEdge |
protected Position2D |
startPosition |
Constructor and Description |
---|
EdgeVisualData(EdgeType originalEdge)
Creates an instance
|
Modifier and Type | Method and Description |
---|---|
Vector2D |
getDirection(boolean readOnly)
Returns the normalized direction vector of the edge stroke, pointing from the start to the end point.
|
EdgeType |
getEdge()
Returns the original edge of the graph
|
Position2D |
getEndPosition()
Returns the center of the end vertex
|
abstract StdLayout.VisVertex |
getEndVertex() |
StdLayout.VisVertex |
getEndVertex(StdLayout.VisVertex curVertex) |
Position2D |
getStartPosition()
Returns the center of the start vertex
|
abstract StdLayout.VisVertex |
getStartVertex() |
abstract void |
update(GraphLibrary<VertexType,EdgeType> graph) |
abstract void |
updateDirection() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEndLinePosition, getStartLinePosition
protected EdgeType originalEdge
protected Vector2D direction
protected Position2D startPosition
protected Position2D endPosition
public EdgeVisualData(EdgeType originalEdge)
originalEdge
- the edge to visualizepublic abstract void updateDirection()
public abstract void update(GraphLibrary<VertexType,EdgeType> graph)
public abstract StdLayout.VisVertex getStartVertex()
public abstract StdLayout.VisVertex getEndVertex()
public EdgeType getEdge()
public Position2D getStartPosition()
EdgeArealData
getStartPosition
in interface EdgeArealData
public Position2D getEndPosition()
EdgeArealData
getEndPosition
in interface EdgeArealData
public Vector2D getDirection(boolean readOnly)
EdgeArealData
getDirection
in interface EdgeArealData
readOnly
- if true, then the reference to the internal direction is given. It must not be modified.public StdLayout.VisVertex getEndVertex(StdLayout.VisVertex curVertex)