TurtleGraphics
Class WiggleRainbowPen

java.lang.Object
  extended by TurtleGraphics.AbstractPen
      extended by TurtleGraphics.StandardPen
          extended by TurtleGraphics.WigglePen
              extended by TurtleGraphics.WiggleRainbowPen
All Implemented Interfaces:
Pen

public class WiggleRainbowPen
extends WigglePen

Copyright 2006 by Ken Lambert and Martin Osborne.

Provides behavior for a pen with wiggles and random colors (combines the behavior of WigglePen and RainbowPen).


Field Summary
 
Fields inherited from class TurtleGraphics.AbstractPen
color, direction, isDown, pad, width, xPos, yPos
 
Constructor Summary
WiggleRainbowPen()
           
WiggleRainbowPen(SketchPad pad, int wiggles, double wiggleAngle)
           
WiggleRainbowPen(SketchPadWindow w)
           
 
Method Summary
 void drawString(java.lang.String str)
          Action: Draws the string at the pen's position.
 void move(double distance)
          Action: The pen moves the specified distance in the current direction.
 void move(double x, double y)
          Action: Moves the pen to the position (x, y).
 
Methods inherited from class TurtleGraphics.StandardPen
drawLine
 
Methods inherited from class TurtleGraphics.AbstractPen
down, home, isDown, setColor, setDirection, setWidth, toString, turn, turn, up
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WiggleRainbowPen

public WiggleRainbowPen()

WiggleRainbowPen

public WiggleRainbowPen(SketchPad pad,
                        int wiggles,
                        double wiggleAngle)

WiggleRainbowPen

public WiggleRainbowPen(SketchPadWindow w)
Method Detail

drawString

public void drawString(java.lang.String str)
Description copied from interface: Pen
Action: Draws the string at the pen's position.

Specified by:
drawString in interface Pen
Overrides:
drawString in class StandardPen

move

public void move(double distance)
Description copied from interface: Pen
Action: The pen moves the specified distance in the current direction. The distance can be an integer or floating-point number and is measured in pixels (picture elements). The size of a pixel depends on the monitorŐs resolution. For instance, when we say that a monitor's resolution is 800 by 600, we mean that the monitor is 800 pixels wide and 600 pixels high.

Specified by:
move in interface Pen
Overrides:
move in class WigglePen

move

public void move(double x,
                 double y)
Description copied from interface: Pen
Action: Moves the pen to the position (x, y).

Specified by:
move in interface Pen
Overrides:
move in class WigglePen