public interface GraphComponentDrawer
Modifier and Type | Method and Description |
---|---|
void |
drawEdge(Edge edge,
java.util.List<Position> intermediatePosition,
java.awt.Graphics graphics)
Draw the given edge through the given intermediate positions, with the given Graphics object.
|
java.awt.Shape |
drawNode(Node node,
Position position,
java.awt.Graphics graphics,
java.awt.Color background,
Shape shape)
Draw the given node at the given position, with the given Graphics object.
|
static GraphComponentDrawer |
getGraphComponentDrawer(Graph graph) |
default double |
horizontalBorder()
The horizontal border needed by the drawn nodes.
|
default double |
verticalBorder()
The vertical border needed by the drawn nodes.
|
static GraphComponentDrawer getGraphComponentDrawer(Graph graph)
java.awt.Shape drawNode(Node node, Position position, java.awt.Graphics graphics, java.awt.Color background, Shape shape)
node
- The node to draw.position
- The screen position at which to draw the node.graphics
- The Graphics object to draw the node with.background
- The background color to draw the node with.shape
- The shape to draw the node as.void drawEdge(Edge edge, java.util.List<Position> intermediatePosition, java.awt.Graphics graphics)
edge
- The edge to draw.intermediatePosition
- The positions to draw the edge through. The edge should be drawn in segments of
intermediatePositions[0] -> intermediatePositions[1] -> intermediatePositions[2] ...graphics
- The Graphics object to draw the edge with.default double horizontalBorder()
default double verticalBorder()