annas.graph.drawing
Class GraphDrawer<N,A extends ArcInterface<N>>

java.lang.Object
  extended by annas.graph.drawing.GraphDrawer<N,A>
Type Parameters:
N - Node type
A - Arc types

public class GraphDrawer<N,A extends ArcInterface<N>>
extends java.lang.Object

Creates a graphical representation of a graph.

Author:
Sam Wilson

Constructor Summary
GraphDrawer(GraphInterface<N,A> graph)
           
GraphDrawer(GraphInterface<N,A> graph, DrawNode<N> nodeDrawer, DrawArc<A> arcDrawer, Placer<N,A> placer)
           
 
Method Summary
 java.awt.image.BufferedImage draw()
          Draws the graph
 java.awt.image.BufferedImage draw(java.awt.image.BufferedImage buffImage)
          Draws the graph
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphDrawer

public GraphDrawer(GraphInterface<N,A> graph)

GraphDrawer

public GraphDrawer(GraphInterface<N,A> graph,
                   DrawNode<N> nodeDrawer,
                   DrawArc<A> arcDrawer,
                   Placer<N,A> placer)
Method Detail

draw

public java.awt.image.BufferedImage draw()
Draws the graph

Returns:
graphical representation of the graph

draw

public java.awt.image.BufferedImage draw(java.awt.image.BufferedImage buffImage)
Draws the graph

Parameters:
buffImage - Image to draw the graph on
Returns:
graphical representation of the graph