Class Cartesian.Cartesian
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Cartesian.Cartesian

java.lang.Object
   |
   +----Cartesian.Cartesian

public class Cartesian
extends Object
The Cartesian class provides a way to use Cartesian coordinates for Java windows.
See Also:
C_Point, C_Line, C_Rectangle

Constructor Index

 o Cartesian(Graphics, Rect)
The constructor receives a Graphics to which the Cartesian class will become attached, and the size of the window.

Method Index

 o Line(C_Point, C_Point)
This method draws a line from C_Point A to C_Point B.
 o Line(int, int, int, int)
This method draws a line from (X1, Y1) to (X2, Y2).  It is equivalent to LineCoord.
 o LineCoord(int, int, int, int)
This method draws a line from (X1, Y1) to (X2, Y2).
 o PolyGon(int, VertexList)
This method draws a closed polygon connecting the points of a VertexList, in order. 
 o PolyLine(int, VertexCoordinateList, VertexCoordinateList)
This method draws lines connecting the points of a VertexList, in order. 
 o PolyLine(int, VertexList)
This method draws lines connecting the points of a VertexList, in order. 
 o PolyLineCoord(int, VertexCoordinateList, VertexCoordinateList)
This method draws lines connecting the points of a VertexList, in order. 
 o Rectangle(C_Point, C_Point)
This method draws a rectangle with lower left corner at C_Point BottomLeft, and upper right corner C_Point TopRight.  It is equivalent to RectanglePt.
 o Rectangle(int, int, int, int)
This method draws a rectangle with lower left corner at (Left, Bottom), and upper right corner at (Right, Top).  It is equivalent to RectangleCoord.
 o RectangleCoord(int, int, int, int)
This method draws a rectangle with lower left corner at (Left, Bottom), and upper right corner at (Right, Top).  It is equivalent to Rectangle with integer parameters.
 o RectanglePt(C_Point, C_Point)
This method draws a rectangle with lower left corner at C_Point BottomLeft, and upper right corner C_Point TopRight.  It is equivalent to RectanglePt.
 o SetColor(Color)
This method sets the drawing color for future calls. 
 o String(int, int, String)
 o Text(C_Point, String)
This method draws text from the string, with the lower left corner at point LL. 

Constructors

 o Cartesian
  public Cartesian(Graphics NewCanvas,
                   Rect NewExtent)
The constructor receives a Graphics to which the Cartesian class will become attached, and the size of the window.
Parameters:
NewCanvas - The Graphics class instance on which the Cartesian coordinates will be imposed.
NewExtent - The size of the window.

Methods

 o LineCoord
  public void LineCoord(int X1,
                        int Y1,
                        int X2,
                        int Y2)
This method draws a line from (X1, Y1) to (X2, Y2).
Parameters:
X1 - Horizontal position of the start of the line.
Y1 - Vertical position of the start of the line.
X2 - Horizontal position of the end of the line.
Y2 - Vertical position of the end of the line.
 o Line
  public void Line(int X1,
                   int Y1,
                   int X2,
                   int Y2)
This method draws a line from (X1, Y1) to (X2, Y2).  It is equivalent to LineCoord.
Parameters:
X1 - Horizontal position of the start of the line.
Y1 - Vertical position of the start of the line.
X2 - Horizontal position of the end of the line.
Y2 - Vertical position of the end of the line.
 o Line
  public void Line(C_Point A,
                   C_Point B)
This method draws a line from C_Point A to C_Point B.
Parameters:
A - Beginning point of the line.
B - Ending point of the line.
 o Rectangle
  public void Rectangle(int Left,
                        int Bottom,
                        int Right,
                        int Top)
This method draws a rectangle with lower left corner at (Left, Bottom), and upper right corner at (Right, Top).  It is equivalent to RectangleCoord.
Parameters:
Left - Horizontal position of the left side of the rectangle.
Bottom - Vertical position of the bottom of the rectangle.
Right - Horizontal position of the right side of the rectangle.
Top - Vertical position of the top of the rectangle.
 o RectangleCoord
  public void RectangleCoord(int Left,
                             int Bottom,
                             int Right,
                             int Top)
This method draws a rectangle with lower left corner at (Left, Bottom), and upper right corner at (Right, Top).  It is equivalent to Rectangle with integer parameters.
Parameters:
Left - Horizontal position of the left side of the rectangle.
Bottom - Vertical position of the bottom of the rectangle.
Right - Horizontal position of the right side of the rectangle.
Top - Vertical position of the top of the rectangle.
 o Rectangle
  public void Rectangle(C_Point BottomLeft,
                        C_Point TopRight)
This method draws a rectangle with lower left corner at C_Point BottomLeft, and upper right corner C_Point TopRight.  It is equivalent to RectanglePt.
Parameters:
BottomLeft - C_Point at the lower left corner of the rectangle.
TopRight - C_Point at the upper right corner of the rectangle.
 o RectanglePt
  public void RectanglePt(C_Point BottomLeft,
                          C_Point TopRight)
This method draws a rectangle with lower left corner at C_Point BottomLeft, and upper right corner C_Point TopRight.  It is equivalent to RectanglePt.
Parameters:
BottomLeft - C_Point at the lower left corner of the rectangle.
TopRight - C_Point at the upper right corner of the rectangle.
 o PolyGon
  public void PolyGon(int VertexCount,
                      VertexList Vertices)
This method draws a closed polygon connecting the points of a VertexList, in order. 
Parameters:
VertexCount - Number of points in the VertexList.
Vertices - The list of points.
 o PolyLine
  public void PolyLine(int VertexCount,
                       VertexList Vertices)
This method draws lines connecting the points of a VertexList, in order. 
Parameters:
VertexCount - Number of points in the VertexList.
Vertices - The list of points.
 o PolyLine
  public void PolyLine(int VertexCount,
                       VertexCoordinateList X,
                       VertexCoordinateList Y)
This method draws lines connecting the points of a VertexList, in order. 
Parameters:
VertexCount - Number of points in the VertexList.
X - The list of horizontal positions.
Y - The list of vertical positions.
 o PolyLineCoord
  public void PolyLineCoord(int VertexCount,
                            VertexCoordinateList X,
                            VertexCoordinateList Y)
This method draws lines connecting the points of a VertexList, in order. 
Parameters:
VertexCount - Number of points in the VertexList.
X - The list of horizontal positions.
Y - The list of vertical positions.
 o Text
  public void Text(C_Point LL,
                   String Words)
This method draws text from the string, with the lower left corner at point LL. 
Parameters:
LL - Lower Left corner of the text
Words - The text to be drawn
 o String
  public void String(int x,
                     int y,
                     String Text)
 o SetColor
  public void SetColor(Color NewColor)
This method sets the drawing color for future calls. 
Parameters:
NewColor - The new color.

All Packages  Class Hierarchy  This Package  Previous  Next  Index
1