FileDocCategorySizeDatePackage
Plotter.javaAPI DocExample1428Tue Oct 09 15:46:40 BST 2001None

Plotter

public 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).
author
Ian F. Darwin

Fields Summary
public final int
MAXX
public final int
MAXY
protected int
curx
Current X co-ordinate (same reference frame as AWT!)
protected int
cury
Current Y co-ordinate (same reference frame as AWT!)
protected boolean
penIsUp
The current state: up or down
protected int
penColor
The current color
Constructors Summary
Plotter()


	 
		penIsUp = true;
		curx = 0; cury = 0;
	
Methods Summary
public voiddrawBox(java.awt.Dimension d)
Draw a box given an AWT Dimension for its size

		drawBox(d.width, d.height);
	
public voiddrawBox(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 voiddrawBox(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 voiddrawString(java.lang.String s)

abstract voidmoveTo(int absx, int absy)

abstract voidpenColor(int c)

abstract voidpenDown()

abstract voidpenUp()

abstract voidrmoveTo(int incrx, int incry)

abstract voidsetFont(java.lang.String fName, int fSize)