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
-
Cartesian(Graphics, Rect)
- The constructor receives a Graphics to which the Cartesian class
will become attached, and the size of the window.
-
Line(C_Point, C_Point)
- This method draws a line from C_Point A to C_Point B.
-
Line(int, int, int, int)
- This method draws a line from (X1, Y1) to (X2, Y2).
It is equivalent to LineCoord.
-
LineCoord(int, int, int, int)
- This method draws a line from (X1, Y1) to (X2, Y2).
-
PolyGon(int, VertexList)
- This method draws a closed polygon connecting the points of a VertexList,
in order.
-
PolyLine(int, VertexCoordinateList, VertexCoordinateList)
- This method draws lines connecting the points of a VertexList,
in order.
-
PolyLine(int, VertexList)
- This method draws lines connecting the points of a VertexList,
in order.
-
PolyLineCoord(int, VertexCoordinateList, VertexCoordinateList)
- This method draws lines connecting the points of a VertexList,
in order.
-
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.
-
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.
-
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.
-
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.
-
SetColor(Color)
- This method sets the drawing color for future
calls.
-
String(int, int, String)
-
-
Text(C_Point, String)
- This method draws text from the string,
with the lower left corner at point LL.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
String
public void String(int x,
int y,
String Text)
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