`[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

##

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

##

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

##

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.

##

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.

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

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.

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

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

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.

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.

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

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.

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.

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.

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