|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Pen
Copyright 2006 by Ken Lambert and Martin Osborne.
The behavior of all pens.
Method Summary | |
---|---|
void |
down()
Action: The pen lowers itself to the drawing surface. |
void |
drawString(java.lang.String text)
Action: Draws the string at the pen's position. |
void |
home()
The pen jumps to the center of the graphics window without drawing and points north. |
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). |
void |
setColor(java.awt.Color color)
Action: Sets the pen's color to the specified color. |
void |
setDirection(double direction)
Action: The pen points in the indicated direction. |
void |
setWidth(int width)
Action: Sets the pen's width to the specified width (the default width is 2 pixels). |
java.lang.String |
toString()
Action: Returns information about the pen's state. |
void |
turn(double degrees)
Action: The pen adds the indicated degrees to its current direction. |
void |
up()
Action: The pen raises itself from the drawing surface. |
Method Detail |
---|
void down()
void drawString(java.lang.String text)
void home()
void move(double distance)
void move(double x, double y)
void setColor(java.awt.Color color)
void setDirection(double direction)
void setWidth(int width)
java.lang.String toString()
toString
in class java.lang.Object
void turn(double degrees)
void up()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |