annas.graph.drawing
Class DefaultDrawableNode<N>

java.lang.Object
  extended by 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

Constructor Summary
DefaultDrawableNode()
           
DefaultDrawableNode(java.awt.Color color, int size)
           
 
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
 

Constructor Detail

DefaultDrawableNode

public DefaultDrawableNode()

DefaultDrawableNode

public DefaultDrawableNode(java.awt.Color color,
                           int size)
Method Detail

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 on
node - Node to draw
x - x coordinate of the node
y - y coordinate of the node