annas.graph.drawing
Class DefaultDrawableArc<A>

java.lang.Object
  extended by annas.graph.drawing.DefaultDrawableArc<A>
Type Parameters:
A -
All Implemented Interfaces:
DrawArc<A>

public class DefaultDrawableArc<A>
extends java.lang.Object
implements DrawArc<A>

Default implementation of Arc drawer. Draws a straight line from two points (with no indication of direction).

Author:
Sam Wilson

Constructor Summary
DefaultDrawableArc()
           
DefaultDrawableArc(java.awt.Color color)
           
 
Method Summary
 void drawArc(java.awt.Graphics2D graphic, A arc, int x1, int y1, int x2, int y2)
          Draws an arc at a given point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDrawableArc

public DefaultDrawableArc()

DefaultDrawableArc

public DefaultDrawableArc(java.awt.Color color)
Method Detail

drawArc

public void drawArc(java.awt.Graphics2D graphic,
                    A arc,
                    int x1,
                    int y1,
                    int x2,
                    int y2)
Draws an arc at a given point.

Specified by:
drawArc in interface DrawArc<A>
Parameters:
graphic - Graphic object from the image the arc is to be drawn on
arc - arc to draw
x1 - x coordinate of the tail
y1 - y coordinate of the tail
x2 - x coordinate of the head
y2 - y coordinate of the head