Plotterpublic abstract class Plotter extends Object Plotter abstract class. Must be subclassed
for X, DOS, Penman, HP plotter, etc.
Coordinate space: X = 0 at left, increases to right.
Y = 0 at top, increases downward (same as AWT). |
Fields Summary |
---|
public final int | MAXX | public final int | MAXY | protected int | curxCurrent X co-ordinate (same reference frame as AWT!) | protected int | curyCurrent Y co-ordinate (same reference frame as AWT!) | protected boolean | penIsUpThe current state: up or down | protected int | penColorThe current color |
Constructors Summary |
---|
Plotter()
penIsUp = true;
curx = 0; cury = 0;
|
Methods Summary |
---|
public void | drawBox(java.awt.Dimension d)Draw a box given an AWT Dimension for its size
drawBox(d.width, d.height);
| public void | drawBox(java.awt.Rectangle r)Draw a box given an AWT Rectangle for its location and size
moveTo(r.x, r.y);
drawBox(r.width, r.height);
| public void | drawBox(int w, int h)Draw a box of width w and height h
penDown();
rmoveTo(w, 0);
rmoveTo(0, h);
rmoveTo(-w, 0);
rmoveTo(0, -h);
penUp();
| abstract void | drawString(java.lang.String s)
| abstract void | moveTo(int absx, int absy)
| abstract void | penColor(int c)
| abstract void | penDown()
| abstract void | penUp()
| abstract void | rmoveTo(int incrx, int incry)
| abstract void | setFont(java.lang.String fName, int fSize)
|
|