|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object DrawableNode Branch MoveBranch
public class MoveBranch
Class that represents a change in location
Constructor Summary | |
---|---|
MoveBranch(int x,
int y)
Construct a branch with children and next as null |
Method Summary | |
---|---|
void |
drawWith(Turtle t)
Set the location, then draw |
int |
getXPos()
Method to get the x position |
int |
getYPos()
Method to get the Y position |
void |
moveTo(int x,
int y)
Method to move to a new x and y |
String |
toString()
Method to return a string with information about this branch |
Methods inherited from class Branch |
---|
addChild, getFirstChild |
Methods inherited from class DrawableNode |
---|
add, drawOn, getNext, insertAfter, last, remove, setNext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MoveBranch(int x, int y)
x
- the x position to usey
- the y position to useMethod Detail |
---|
public int getXPos()
public int getYPos()
public void moveTo(int x, int y)
x
- the new xy
- the new ypublic String toString()
toString
in class Branch
public void drawWith(Turtle t)
drawWith
in class Branch
t
- the Turtle to draw with
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |