[all packages] [package ] [class hierarchy] [index]

public abstract class Grapher

(source file: Grapher.java)
java.lang.Object
   |
   +----Grapher

The pure class interface.
public abstract class Grapher
A class of `places that graphs can be drawn'. This is implemented either using AWT calls to a graphics context, or with a PostScript back end (all this stuff predates AWT1.1 PrintGraphics contexts).

Author:
Alan Jeffrey
Version: v1.0 1998/06/11

Constuctor Index

O Grapher()

Methods

O black()
Set the colour to black.
O blue()
Set the colour to blue.
O close()
Close the output stream (if there is one).
O drawArrow(int, int, int, int)
Draw an arrow.
O drawCircle(int, int)
Draw a circle.
O drawDot(int, int)
Draw a dot.
O drawLine(int, int, int, int)
Draw a line.
O drawRectangle(int, int, int, int)
Draw a rectangle.
O drawText(int, int, String)
Draw some text.
O drawUTurn(int, int, int, int)
Draw a uturn
O purple()
Set the colour to purple (well, magenta actually).
O red()
Set the colour to red.
O setColour(PremonCat)
Set the appropriate colour for a given category (blue for val, purple for central, red for

Constructors

O Grapher
public Grapher();

Methods

O drawLine
public abstract void drawLine(int llX,
                              int llY,
                              int urX,
                              int urY);
Draw a line.

Parameters:
llX - the lower left x coordinate.
llY - the lower left y coordinate.
urX - the upper right x coordinate.
urY - the upper right y coordinate.

O drawArrow

public abstract void drawArrow(int llX,
                               int llY,
                               int urX,
                               int urY);
Draw an arrow.

Parameters:
llX - the lower left x coordinate.
llY - the lower left y coordinate.
urX - the upper right x coordinate.
urY - the upper right y coordinate.

O drawRectangle

public abstract void drawRectangle(int llX,
                                   int llY,
                                   int urX,
                                   int urY);
Draw a rectangle.

Parameters:
llX - the lower left x coordinate.
llY - the lower left y coordinate.
urX - the upper right x coordinate.
urY - the upper right y coordinate.

O drawText

public abstract void drawText(int x,
                              int y,
                              String text);
Draw some text.

Parameters:
x - the left-hand x coordinate.
y - the baseline y coordinate.
text - the text to draw.

O drawCircle

public abstract void drawCircle(int x,
                                int y);
Draw a circle.

Parameters:
x - the centre x coordinate.
y - the centre y coordinate.

O drawDot

public abstract void drawDot(int x,
                             int y);
Draw a dot.

Parameters:
x - the centre x coordinate.
y - the centre y coordinate.

O drawUTurn

public abstract void drawUTurn(int bot,
                               int left,
                               int top,
                               int right);
Draw a uturn

Parameters:
bot - the lower y coordinate.
left - the left x coordinate.
top - the upper y coordinate.
right - the right x coordinate.

O black

public abstract void black();
Set the colour to black.

O blue

public abstract void blue();
Set the colour to blue.

O purple

public abstract void purple();
Set the colour to purple (well, magenta actually).

O red

public abstract void red();
Set the colour to red.

O close

public abstract void close();
Close the output stream (if there is one).

O setColour

public void setColour(PremonCat C);
Set the appropriate colour for a given category (blue for val, purple for central, red for proc).

Parameters:
C - the category.


[all packages] [package ] [class hierarchy] [index]
Grapher.html