Class MoveBranch

java.lang.Object
  extended byDrawableNode
      extended byBranch
          extended byMoveBranch

public class MoveBranch
extends Branch


Field Summary
(package private)  int x
          Position where to draw at
(package private)  int y
          Position where to draw at
 
Fields inherited from class Branch
children
 
Fields inherited from class DrawableNode
next
 
Constructor Summary
MoveBranch(int x, int y)
          Construct a branch with children and next as null
 
Method Summary
 void drawWith(Turtle pen)
          Use the given turtle to draw oneself
 int getXPos()
          Accessors
 int getYPos()
           
 void moveTo(int x, int y)
           
 String toString()
          Method to return a string with informaiton about this branch
 
Methods inherited from class Branch
addChild
 
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
 

Field Detail

x

int x
Position where to draw at


y

int y
Position where to draw at

Constructor Detail

MoveBranch

public MoveBranch(int x,
                  int y)
Construct a branch with children and next as null

Method Detail

getXPos

public int getXPos()
Accessors


getYPos

public int getYPos()

moveTo

public void moveTo(int x,
                   int y)

toString

public String toString()
Method to return a string with informaiton about this branch

Overrides:
toString in class Branch

drawWith

public void drawWith(Turtle pen)
Description copied from class: DrawableNode
Use the given turtle to draw oneself

Overrides:
drawWith in class Branch