public class BasicGraphComponentDrawer extends java.lang.Object implements GraphComponentDrawer
| Constructor and Description |
|---|
BasicGraphComponentDrawer() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
arrowDistanceFromEnd() |
void |
drawEdge(Edge edge,
java.util.List<Position> intermediatePositions,
java.awt.Graphics g)
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 g,
java.awt.Color background,
Shape shape)
Draw the given node at the given position, with the given Graphics object.
|
double |
horizontalBorder()
The horizontal border needed by the drawn nodes.
|
double |
verticalBorder()
The vertical border needed by the drawn nodes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetGraphComponentDrawerpublic java.awt.Shape drawNode(Node node, Position position, java.awt.Graphics g, java.awt.Color background, Shape shape)
GraphComponentDrawerdrawNode in interface GraphComponentDrawernode - The node to draw.position - The screen position at which to draw the node.g - 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.public void drawEdge(Edge edge, java.util.List<Position> intermediatePositions, java.awt.Graphics g)
GraphComponentDrawerdrawEdge in interface GraphComponentDraweredge - The edge to draw.intermediatePositions - The positions to draw the edge through. The edge should be drawn in segments of
intermediatePositions[0] -> intermediatePositions[1] -> intermediatePositions[2] ...g - The Graphics object to draw the edge with.protected int arrowDistanceFromEnd()
public double verticalBorder()
GraphComponentDrawerverticalBorder in interface GraphComponentDrawerpublic double horizontalBorder()
GraphComponentDrawerhorizontalBorder in interface GraphComponentDrawer