Package visualizationElements
Klasse Edge
java.lang.Object
visualizationElements.Edge
Represents an edge of a graph.
-
Feldübersicht
-
Konstruktorübersicht
KonstruktorBeschreibungCreates a new Edge.Creates a new Edge.Creates a new Edge.Creates a new Edge. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprivate void
createArrow
(int sourceX, int sourceY, int destinationX, int destinationY) Creates data to draw an arrow for directed edges.private void
createArrowDataForDirectEdges
(EdgeStyle edgeStyle) Creates an arrow for directed edges.private void
Creates an arrow for directed loops.void
Draws a directed edge directly from source vertex to destination vertex.void
Draws a directed edge directly from source vertex to destination vertex.void
Draws a directed loop.void
Draws an undirected angled loop.void
Draws an undirected angled edge from source vertex to destination vertex.void
Draws an undirected double edge directly from one vertex to another.void
Draws an undirected edge directly from one vertex to another.void
Draws an undirected loop.getColor()
void
void
setDestination
(Vertex destination) void
setMarking
(String marking) void
-
Felddetails
-
source
-
destination
-
color
-
marking
-
xPoints
int[] xPoints -
yPoints
int[] yPoints -
baseX
float baseX -
baseY
float baseY
-
-
Konstruktordetails
-
Edge
Creates a new Edge.- Parameter:
source
- The vertex the edge starts at.destination
- The vertex the edge ends at.marking
- Marking of the edge.color
- Coloring the edge is drawn.
-
Edge
Creates a new Edge.- Parameter:
source
- The vertex the edge starts at.destination
- The vertex the edge ends at.color
- Coloring the edge is drawn.
-
Edge
Creates a new Edge.- Parameter:
source
- The vertex the edge starts at.destination
- The vertex the edge ends at.marking
- Marking of the edge.
-
Edge
Creates a new Edge.- Parameter:
source
- The vertex the edge starts at.destination
- The vertex the edge ends at.
-
-
Methodendetails
-
setSource
- Parameter:
source
- the source to set
-
getSource
- Gibt zurück:
- the source
-
setDestination
- Parameter:
destination
- the destination to set
-
getDestination
- Gibt zurück:
- the destination
-
setColor
- Parameter:
color
- the color to set
-
getColor
- Gibt zurück:
- the color
-
setMarking
- Parameter:
marking
- the marking to set
-
getMarking
- Gibt zurück:
- the marking
-
drawUndirectedDirectDoubleEdge
Draws an undirected double edge directly from one vertex to another.- Parameter:
g
- Graphics object to draw to DrawArea.
-
drawUndirectedLoop
Draws an undirected loop.- Parameter:
g
- Graphics object to draw to DrawArea.
-
drawUndirectedDirectEdge
Draws an undirected edge directly from one vertex to another.- Parameter:
g
- Graphics object to draw to DrawArea.
-
drawUndirectedAngeledLoop
Draws an undirected angled loop.- Parameter:
g
- Graphics object to draw to DrawArea.
-
drawUndirectedAngledEdge
Draws an undirected angled edge from source vertex to destination vertex.- Parameter:
g
- Graphics object to draw to DrawArea.
-
drawDirectedAngeledEdge
Draws a directed edge directly from source vertex to destination vertex.- Parameter:
g
- Graphics object to draw to DrawArea.
-
drawDirectedLoop
Draws a directed loop.- Parameter:
g
- Graphics object to draw to DrawArea.
-
drawDirectedDirectEdge
Draws a directed edge directly from source vertex to destination vertex.- Parameter:
g
- Graphics object to draw to DrawArea.
-
createArrowDataForDirectEdges
Creates an arrow for directed edges. -
createArrowDataForLoops
private void createArrowDataForLoops()Creates an arrow for directed loops. -
createArrow
private void createArrow(int sourceX, int sourceY, int destinationX, int destinationY) Creates data to draw an arrow for directed edges.- Parameter:
sourceX
- x position of the source vertex.sourceY
- y position of the source vertex.destinationX
- x position of the destination vertex.destinationY
- y position of the destination vertex.
-