annas.graph.drawing
Class GraphDrawer<N,A extends ArcInterface<N>>
java.lang.Object
annas.graph.drawing.GraphDrawer<N,A>
- Type Parameters:
N
- Node typeA
- Arc types
public class GraphDrawer<N,A extends ArcInterface<N>>
- extends java.lang.Object
Creates a graphical representation of a graph.
- Author:
- Sam Wilson
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 |
GraphDrawer
public GraphDrawer(GraphInterface<N,A> graph)
GraphDrawer
public GraphDrawer(GraphInterface<N,A> graph,
DrawNode<N> nodeDrawer,
DrawArc<A> arcDrawer,
Placer<N,A> placer)
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