annas.graph.drawing
Class DefaultDrawableNode<N>
java.lang.Object
annas.graph.drawing.DefaultDrawableNode<N>
- Type Parameters:
N
- Node type
- All Implemented Interfaces:
- DrawNode<N>
public class DefaultDrawableNode<N>
- extends java.lang.Object
- implements DrawNode<N>
Default implementation of Node Drawer. Draws a Circle of the specified
colour.
- Author:
- Sam Wilson
Method Summary |
void |
drawNode(java.awt.Graphics2D graphic,
N node,
int x,
int y)
Draws a node at a point |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDrawableNode
public DefaultDrawableNode()
DefaultDrawableNode
public DefaultDrawableNode(java.awt.Color color,
int size)
drawNode
public void drawNode(java.awt.Graphics2D graphic,
N node,
int x,
int y)
- Draws a node at a point
- Specified by:
drawNode
in interface DrawNode<N>
- Parameters:
graphic
- Graphic object of the image to draw the node onnode
- Node to drawx
- x coordinate of the nodey
- y coordinate of the node