|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTurtleGraphics.AbstractPen
TurtleGraphics.StandardPen
TurtleGraphics.WigglePen
public class WigglePen
Copyright 2006 by Ken Lambert and Martin Osborne.
Provides behavior and state for a pen with wiggles. The shape of the
wiggles depends on a constant rate of wiggling and a wiggle angle. The
default wiggle rate is 5 and the default wiggle angle is 30 degrees.
The client can specify these values with a constructor.
Field Summary |
---|
Fields inherited from class TurtleGraphics.AbstractPen |
---|
color, direction, isDown, pad, width, xPos, yPos |
Constructor Summary | |
---|---|
WigglePen()
Action: Pops up an application window containing a sketchpad and an associated wiggle pen with a wiggle rate of 5 and a wiggle angle of 30 degrees. |
|
WigglePen(SketchPad pad,
int w,
double wa)
Action: Associates a wiggle pen with the client's sketchpad using the client's wiggle rate and wiggle angle. |
|
WigglePen(SketchPadWindow w)
Action: Pops up the client's application window containing a sketchpad and an associated wiggle pen. |
Method Summary | |
---|---|
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, drawString |
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 |
---|
public WigglePen()
public WigglePen(SketchPad pad, int w, double wa)
pad
- The client's sketchpadw
- The number of wiggles or wiggle ratewa
- The wiggle angle in degreespublic WigglePen(SketchPadWindow w)
Method Detail |
---|
public void move(double distance)
Pen
move
in interface Pen
move
in class AbstractPen
public void move(double x, double y)
Pen
move
in interface Pen
move
in class AbstractPen
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |