All Packages Class Hierarchy This Package Previous Next Index
Class crw.awt.Plot
java.lang.Object
|
+----crw.awt.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
-
Plot()
-
-
drawArrow(Graphics, int, int, char)
- Draws a solid arrow, vertical or horizontal.
-
drawArrow(Graphics, int, int, char, int)
- Draws a solid arrow, vertical or horizontal.
-
drawArrow(Graphics, int, int, String)
- Draws a solid arrow oriented 45 degrees.
-
drawArrow(Graphics, int, int, String, int)
- Draws a solid arrow oriented 45 degrees.
-
drawArrowDown(int, int, int, Graphics)
- Draws an arrow head at the arrow-tip location.
-
drawArrowLeft(int, int, int, Graphics)
- Draws an arrow head at the arrow-tip location.
-
drawArrowRight(int, int, int, Graphics)
- Draws an arrow head at the arrow-tip location.
-
drawArrowUp(int, int, int, Graphics)
- Draws an arrow head at the arrow-tip location.
-
drawHDashedLine(int, int, int, Graphics)
- Draws a horizontal dashed line with gap and line legths of width 3.
-
drawHDashedLine(int, int, int, Graphics, int)
- Draws a horizontal dashed line.
-
drawVDashedLine(int, int, int, Graphics, int)
- Draws a vertical dashed line.
-
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.
-
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.
-
drawVStrikeLine(int, int, int, Graphics)
- Draws a vertical line with a strike at 1/4 distance from
initial position.
-
drawVStrikeLine(int, int, int, Graphics, double)
- Draws a vertical line having a strike point at the
specified point.
-
drawVStrikeLine(int, int, int, Graphics, double, int)
- Draws the vertical line having a STRIKE point at the specified
position and specified strike line length.
-
imgRectHori(int, int, Color, Color, Component)
- Creates a retangular image with its Color graded linearly
in the horizontal direction.
-
imgRectVert(int, int, Color, Color, Component)
- Creates a retangular image with its Color graded linearly
in vertical direction.
-
makeArrow(int, int, char, int)
- Creates the arrow-shaped polygon.
-
makeArrow(int, int, String, int)
- Creates the arrow-shaped polygon.
Plot
public Plot()
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.
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'.
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.
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".
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
imgRectVert
public static Image imgRectVert(int width,
int height,
Color top,
Color bottom,
Component comp)
- Creates a retangular image with its Color graded linearly
in vertical direction.
- Parameters:
- width - the width of the image rectangle.
- height - the height of the image rectangle.
- top - the Color of the top side.
- bottom - the Color of the bottom side.
- Returns:
- the rectangular image of size width x height.
imgRectHori
public static Image imgRectHori(int width,
int height,
Color left,
Color right,
Component comp)
- Creates a retangular image with its Color graded linearly
in the horizontal direction.
- Parameters:
- width - the width of the image rectangle.
- height - the height of the image rectangle.
- left - the Color of the left edge.
- right - the Color of the right edge.
- Returns:
- the rectangular image of size width x height.
All Packages Class Hierarchy This Package Previous Next Index