utilities
Class Arrow

java.lang.Object
  |
  +--utilities.Arrow

public class Arrow
extends java.lang.Object

Draws an arrow


Constructor Summary
Arrow()
           
 
Method Summary
static void drawArrow(java.awt.Graphics g, int x1, int y1, int x2, int y2)
          Draws a line with an arrowhead at its terminal end (x2,y2)
static void drawArrow(java.awt.Graphics g, int x1, int y1, int x2, int y2, boolean start, boolean end, double place)
          Draws line with arrow heads at either end.
static void drawArrow(java.awt.Graphics g, int x1, int y1, int x2, int y2, double place)
          Draws a line with an arrowhead at its end (x2,y2) adjusted by place
static void drawArrowhead(java.awt.Graphics g, int x1, int y1, int x2, int y2)
          Just draws an arrowhead at the end
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Arrow

public Arrow()
Method Detail

drawArrow

public static void drawArrow(java.awt.Graphics g,
                             int x1,
                             int y1,
                             int x2,
                             int y2,
                             boolean start,
                             boolean end,
                             double place)
Draws line with arrow heads at either end. Location of the arrowheads along the line is controlled by the place parameter (for example, if place = 0.45, arrowheads would be placed at spots 45% away from their respective ends)
Parameters:
g - The graphics world to draw in
x1-y2 - Coords of the line
start - Arrowhead at start
end - Arrowhead at end
place - A double [0-1] indicating the line length percentage (from start) at which the arrow tip will be placed.

drawArrowhead

public static void drawArrowhead(java.awt.Graphics g,
                                 int x1,
                                 int y1,
                                 int x2,
                                 int y2)
Just draws an arrowhead at the end
Parameters:
g - The graphics world to draw in
x1-y2 - Coords of the line
start - Arrowhead at start
end - Arrowhead at end

drawArrow

public static void drawArrow(java.awt.Graphics g,
                             int x1,
                             int y1,
                             int x2,
                             int y2,
                             double place)
Draws a line with an arrowhead at its end (x2,y2) adjusted by place
Parameters:
g - The graphics world to draw in
x1-y2 - Coords of the line
place - A double [0-1] indicating the line length percentage (from start) at which the arrow tip will be placed.

drawArrow

public static void drawArrow(java.awt.Graphics g,
                             int x1,
                             int y1,
                             int x2,
                             int y2)
Draws a line with an arrowhead at its terminal end (x2,y2)
Parameters:
g - The graphics world to draw in
x1-y2 - Coords of the line