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

public class Drawer

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

The pure class interface.
public class Drawer
A drawing area graphs can be drawn on.

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

Constuctor Index

O Drawer(Grapher, Solution)
Create a new drawing area.

Methods

O drawArrows(int, int, Interface)
Draw horizontal arrows.
O drawBlueText(int, int, int, int, String)
Draw some blue text with a blue box round it.
O drawCircles(int, Interface)
Draw a vertical line of circles.
O drawControlCircle(int, int)
Draw a red dot.
O drawControlLine(int, int, int, int)
Draw a red line.
O drawDot(int, int)
Draw a black dot.
O drawLines(int, int, Interface)
Draw black horizontal lines.
O drawPurpleText(int, int, int, int, String)
Draw some purple text with a purple box round it.
O drawRectangle(int, int, int, int)
Draw a blue rectangle.
O drawRedText(int, int, int, int, String)
Draw some red text with a red box round it.
O drawShuffle(int, int, Shuffle, Interface, Interface)
Draw a shuffle.
O drawUTurns(Interface, Interface, Interface, int)
Draw some C-shaped U-turns

Constructors

O Drawer
public Drawer(Grapher g,
              Solution s);
Create a new drawing area.

Parameters:
g - the graphics area to draw on.
s - the solution set to look up variables in.

Methods

O drawLines
public void drawLines(int fromX,
                      int toX,
                      Interface ys);
Draw black horizontal lines.

Parameters:
fromX - the starting x coordinate variable
toX - the finishing x coordinate variable
ys - the y coordinate variables.

O drawControlLine

public void drawControlLine(int fromX,
                            int fromY,
                            int toX,
                            int toY);
Draw a red line.

Parameters:
fromX - the starting x coordinate variable
fromY - the starting y coordinate variable
toX - the finishing x coordinate variable
toY - the finishing y coordinate variable

O drawArrows

public void drawArrows(int fromX,
                       int toX,
                       Interface ys);
Draw horizontal arrows.

Parameters:
fromX - the starting x coordinate variable
toX - the finishing x coordinate variable
ys - the y coordinate variables.

O drawRectangle

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

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

O drawCircles

public void drawCircles(int x,
                        Interface ys);
Draw a vertical line of circles.

Parameters:
x - the x coordinate variable for all of the circles
ys - the y coordinate variables

O drawDot

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

Parameters:
x - the x coordinate variable for the dot.
x - the y coordinate variable for the dot.

O drawControlCircle

public void drawControlCircle(int x,
                              int y);
Draw a red dot.

Parameters:
x - the x coordinate variable for the dot.
x - the y coordinate variable for the dot.

O drawUTurns

public void drawUTurns(Interface botI,
                       Interface horizI,
                       Interface topI,
                       int right);
Draw some C-shaped U-turns

Parameters:
botI - the lower y coordinate variables
horizI - the left-hand x coordinate variables
topI - the upper y coordinate variables
right - the right-hand x coordinate variable

O drawBlueText

public void drawBlueText(int llX,
                         int llY,
                         int urX,
                         int urY,
                         String text);
Draw some blue text with a blue box round it.

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

O drawPurpleText

public void drawPurpleText(int llX,
                           int llY,
                           int urX,
                           int urY,
                           String text);
Draw some purple text with a purple box round it.

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

O drawRedText

public void drawRedText(int llX,
                        int llY,
                        int urX,
                        int urY,
                        String text);
Draw some red text with a red box round it.

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

O drawShuffle

public void drawShuffle(int left,
                        int right,
                        Shuffle f,
                        Interface source,
                        Interface target);
Draw a shuffle.

Parameters:
left - the left-hand x coordinate variable
right - the right-hand x coordinate variable
f - the shuffle
source - the left-hand y coordinate variables
target - the right-hand y coordinate variables


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