All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class crw.data3.Plot

java.lang.Object
   |
   +----crw.data3.Plot

public class Plot
extends Object
A utility class for drawing commonly used lines, etc.

Version:
1.0, 1998/2/4
Author:
C. R. Wie

Constructor Index

 o Plot()

Method Index

 o drawArrow(Graphics, int, int, char)
Draws a solid arrow, vertical or horizontal.
 o drawArrow(Graphics, int, int, char, int)
Draws a solid arrow, vertical or horizontal.
 o drawArrow(Graphics, int, int, String)
Draws a solid arrow oriented 45 degrees.
 o drawArrow(Graphics, int, int, String, int)
Draws a solid arrow oriented 45 degrees.
 o drawArrowDown(int, int, int, Graphics)
Draws an arrow head at the arrow-tip location.
 o drawArrowLeft(int, int, int, Graphics)
Draws an arrow head at the arrow-tip location.
 o drawArrowRight(int, int, int, Graphics)
Draws an arrow head at the arrow-tip location.
 o drawArrowUp(int, int, int, Graphics)
Draws an arrow head at the arrow-tip location.
 o drawBlinkingArrow(Graphics, int, int, char)
Draws a solid, blinking arrow, vertical or horizontal.
 o drawBlinkingArrow(Graphics, int, int, char, boolean)
Draws a solid, blinking arrow, vertical or horizontal.
 o drawBlinkingArrow(Graphics, int, int, char, int, boolean)
Draws a solid, blinking arrow, vertical or horizontal.
 o drawBlinkingArrow(Graphics, int, int, char, int, int, boolean)
Draws a solid, blinking arrow, vertical or horizontal.
 o drawBlinkingArrow(Graphics, int, int, String)
Draws a solid, blinking arrow oriented 45 degrees.
 o drawBlinkingArrow(Graphics, int, int, String, boolean)
Draws a solid, blinking arrow oriented 45 degrees.
 o drawBlinkingArrow(Graphics, int, int, String, int, boolean)
Draws a solid, blinking arrow oriented 45 degrees.
 o drawBlinkingArrow(Graphics, int, int, String, int, int, boolean)
Draws a solid, blinking arrow oriented 45 degrees.
 o drawHDashedLine(int, int, int, Graphics)
Draws a horizontal dashed line with gap and line legths of width 3.
 o drawHDashedLine(int, int, int, Graphics, int)
Draws a horizontal dashed line.
 o drawVDashedLine(int, int, int, Graphics, int)
Draws a vertical dashed line.
 o drawVStrikeArrow(int, int, int, Graphics)
Draws an arrowed vertical line having a strike point, at 1/4 from the initial y-position and with a 6-pixels length.
 o drawVStrikeArrow(int, int, int, Graphics, double, int, int)
Draws an arrowed vertical line having a strike point, at the specified position and with a specified length.
 o drawVStrikeLine(int, int, int, Graphics)
Draws a vertical line with a strike at 1/4 distance from initial position.
 o drawVStrikeLine(int, int, int, Graphics, double)
Draws a vertical line having a strike point at the specified point.
 o drawVStrikeLine(int, int, int, Graphics, double, int)
Draws the vertical line having a STRIKE point at the specified position and specified strike line length.
 o makeArrow(int, int, char, int)
Creates the arrow-shaped polygon.
 o makeArrow(int, int, String, int)
Creates the arrow-shaped polygon.

Constructors

 o Plot
  public Plot()

Methods

 o drawBlinkingArrow
  public static void drawBlinkingArrow(Graphics g,
                                       int x0,
                                       int y0,
                                       char orient,
                                       int size,
                                       int blinkTimes,
                                       boolean disposeGraphics)
Draws a solid, blinking arrow, vertical or horizontal.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: 'N', 'S', 'E', or 'W'.
size - the arrow size: ranges 3 to 12.
blinkTimes - how many times to blink before disappearing.
disposeGraphics - whether to dispose the Graphics object after blinking
 o drawBlinkingArrow
  public static void drawBlinkingArrow(Graphics g,
                                       int x0,
                                       int y0,
                                       char orient,
                                       int size,
                                       boolean disposeGraphics)
Draws a solid, blinking arrow, vertical or horizontal. Blinks 16 times.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: 'N', 'S', 'E', or 'W'.
size - the arrow size: ranges 3 to 12.
disposeGraphics - whether to dispose the Graphics object after blinking
 o drawBlinkingArrow
  public static void drawBlinkingArrow(Graphics g,
                                       int x,
                                       int y,
                                       char orient,
                                       boolean disposeGraphics)
Draws a solid, blinking arrow, vertical or horizontal. Default size is 5. Blinks 8 times.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: 'N', 'S', 'E', or 'W'.
disposeGraphics - whether to dispose the Graphics object after blinking
 o drawBlinkingArrow
  public static void drawBlinkingArrow(Graphics g,
                                       int x,
                                       int y,
                                       char orient)
Draws a solid, blinking arrow, vertical or horizontal. Size = 5, Blinks 16 times, Dispose graphics.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: 'N', 'S', 'E', or 'W'.
 o drawBlinkingArrow
  public static void drawBlinkingArrow(Graphics g,
                                       int x0,
                                       int y0,
                                       String orient,
                                       int size,
                                       int blinkTimes,
                                       boolean disposeGraphics)
Draws a solid, blinking arrow oriented 45 degrees.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: "NW", "NE", "SE", or "SW".
size - the arrow size: ranges 3 to 15.
blinkTimes - how many times to blink before disappearing.
disposeGraphics - whether to dispose the Graphics object after blinking
 o drawBlinkingArrow
  public static void drawBlinkingArrow(Graphics g,
                                       int x0,
                                       int y0,
                                       String orient,
                                       int size,
                                       boolean disposeGraphics)
Draws a solid, blinking arrow oriented 45 degrees. Blinks 8 times.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: "NW", "NE", "SE", or "SW".
size - the arrow size: ranges 3 to 15.
disposeGraphics - whether to dispose the Graphics object after blinking
 o drawBlinkingArrow
  public static void drawBlinkingArrow(Graphics g,
                                       int x,
                                       int y,
                                       String orient,
                                       boolean disposeGraphics)
Draws a solid, blinking arrow oriented 45 degrees. Blinks 8 times. Size is 7.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: "NW", "NE", "SE", or "SW".
disposeGraphics - whether to dispose the Graphics object after blinking
 o drawBlinkingArrow
  public static void drawBlinkingArrow(Graphics g,
                                       int x,
                                       int y,
                                       String orient)
Draws a solid, blinking arrow oriented 45 degrees. Blinks 8 times. Size is 7. Disposes graphics object.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: "NW", "NE", "SE", or "SW".
 o drawArrow
  public static void drawArrow(Graphics g,
                               int x0,
                               int y0,
                               char orient,
                               int size)
Draws a solid arrow, vertical or horizontal.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: 'N', 'S', 'E', or 'W'.
size - the arrow size: ranges 3 to 12.
 o drawArrow
  public static void drawArrow(Graphics g,
                               int x0,
                               int y0,
                               char orient)
Draws a solid arrow, vertical or horizontal. Size is 5.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: 'N', 'S', 'E', or 'W'.
 o drawArrow
  public static void drawArrow(Graphics g,
                               int x0,
                               int y0,
                               String orient,
                               int size)
Draws a solid arrow oriented 45 degrees.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: "NW", "NE", "SE", or "SW".
size - the arrow size: ranges 3 to 15.
 o drawArrow
  public static void drawArrow(Graphics g,
                               int x0,
                               int y0,
                               String orient)
Draws a solid arrow oriented 45 degrees. Size is 7.

Parameters:
g - the Graphics context.
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: "NW", "NE", "SE", or "SW".
 o makeArrow
  public static Polygon makeArrow(int x0,
                                  int y0,
                                  char orient,
                                  int size)
Creates the arrow-shaped polygon. The Graphics.fillPolygon(Polygon) will draw a solid arrow. An ArrowBlinker object uses it too.

Parameters:
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: 'N', 'S', 'E', or 'W'.
size - the arrow size: ranges 3 to 12.
 o makeArrow
  public static Polygon makeArrow(int x0,
                                  int y0,
                                  String orient,
                                  int size)
Creates the arrow-shaped polygon. The Graphics.fillPolygon(Polygon) will draw a solid arrow. An ArrowBlinker object uses it too.

Parameters:
x0 - the x-coordinate of the arrow tip.
y0 - the y-coordinate of the arrow tip.
orient - the orientation: "NW", "NE", "SE", or "SW".
size - the arrow size: ranges 3 to 12.
 o drawArrowRight
  public static void drawArrowRight(int x,
                                    int y,
                                    int size,
                                    Graphics g)
Draws an arrow head at the arrow-tip location.

Parameters:
x - the x-coordinate of the arrow tip.
y - the y-coordinate of the arrow-tip.
size - the length of arrow head in pixels.
g - the Graphics context to draw in.
 o drawArrowLeft
  public static void drawArrowLeft(int x,
                                   int y,
                                   int size,
                                   Graphics g)
Draws an arrow head at the arrow-tip location.

Parameters:
x - the x-coordinate of the arrow tip.
y - the y-coordinate of the arrow-tip.
size - the length of arrow head in pixels.
g - the Graphics context to draw in.
 o drawArrowUp
  public static void drawArrowUp(int x,
                                 int y,
                                 int size,
                                 Graphics g)
Draws an arrow head at the arrow-tip location.

Parameters:
x - the x-coordinate of the arrow tip.
y - the y-coordinate of the arrow-tip.
size - the length of arrow head in pixels.
g - the Graphics context to draw in.
 o drawArrowDown
  public static void drawArrowDown(int x,
                                   int y,
                                   int size,
                                   Graphics g)
Draws an arrow head at the arrow-tip location.

Parameters:
x - the x-coordinate of the arrow tip.
y - the y-coordinate of the arrow-tip.
size - the length of arrow head in pixels.
g - the Graphics context to draw in.
 o drawVStrikeLine
  public static void drawVStrikeLine(int x,
                                     int yi,
                                     int yf,
                                     Graphics g)
Draws a vertical line with a strike at 1/4 distance from initial position.

Parameters:
x - the x-coordinate of the vertical line.
yi - the initial y-coordinate.
yf - the final y-coordinate.
g - the Graphics context.
 o drawVStrikeLine
  public static void drawVStrikeLine(int x,
                                     int yi,
                                     int yf,
                                     Graphics g,
                                     double r)
Draws a vertical line having a strike point at the specified point.

Parameters:
x - the x-coordinate of the vertical line.
yi - the initial y-coordinate.
yf - the final y-coordinate.
g - the Graphics context to draw the line in.
r - the relative position of the STRIKE point from the initial yi.
 o drawVStrikeLine
  public static void drawVStrikeLine(int x,
                                     int yi,
                                     int yf,
                                     Graphics g,
                                     double r,
                                     int dy)
Draws the vertical line having a STRIKE point at the specified position and specified strike line length.

Parameters:
x - the x-coordinate of the vertical line.
yi - the initial y-coordinate.
yf - the final y-coordinate.
g - the Graphics context to draw the line in.
r - the relative position of the STRIKE point from the initial yi.
dy - the length of the strike-line.
 o drawVStrikeArrow
  public static void drawVStrikeArrow(int x,
                                      int yi,
                                      int yf,
                                      Graphics g,
                                      double r,
                                      int dy,
                                      int dy2)
Draws an arrowed vertical line having a strike point, at the specified position and with a specified length. Length of the arrow-line is also specified.

Parameters:
x - the x-coordinate of the vertical line.
yi - initial y-coordinate.
yf - final y-coordinate.
g - Graphics context to draw the line in.
r - relative position of the STRIKE point from the initial yi.
dy - length of the strike-line.
dy2 - length of the arrow-line.
 o drawVStrikeArrow
  public static void drawVStrikeArrow(int x,
                                      int yi,
                                      int yf,
                                      Graphics g)
Draws an arrowed vertical line having a strike point, at 1/4 from the initial y-position and with a 6-pixels length. The arrow-line length is 3pixels long.

Parameters:
x - the x-coordinate of the vertical line.
yi - initial y-coordinate.
yf - final y-coordinate.
g - Graphics context to draw the line in.
r - relative position of the STRIKE point from the initial yi.
dy - length of the strike-line.
dy2 - length of the arrow-line.
 o drawHDashedLine
  public static void drawHDashedLine(int x1,
                                     int x2,
                                     int y,
                                     Graphics g,
                                     int dx)
Draws a horizontal dashed line.

Parameters:
x1 - the beginning x-coordinate.
x2 - the ending x-coordinate.
y - the y-coordinate.
g - the Graphics context.
dx - the line and gap widths.
 o drawHDashedLine
  public static void drawHDashedLine(int x1,
                                     int x2,
                                     int y,
                                     Graphics g)
Draws a horizontal dashed line with gap and line legths of width 3.

Parameters:
x1 - the beginning x-coordinate.
x2 - the ending x-coordinate.
y - the y-coordinate.
g - the Graphics context.
 o drawVDashedLine
  public static void drawVDashedLine(int x,
                                     int y1,
                                     int y2,
                                     Graphics g,
                                     int dy)
Draws a vertical dashed line.

Parameters:
x - the x-coordinate.
y1 - the beginning y-coordinate.
y2 - the ending y-coordinate.
g - the Graphics context.
dy - the line and gap widths.

All Packages  Class Hierarchy  This Package  Previous  Next  Index