Class PositionedSceneElement

java.lang.Object
  extended byPositionedSceneElement

public class PositionedSceneElement
extends Object


Constructor Summary
PositionedSceneElement(Picture heldPic)
          Make a new element with a picture as input, and next as null.
 
Method Summary
 PositionedSceneElement copy()
           
 void drawFromMeOn(Picture bg)
          Method to draw from this node on in the list, using bluescreen.
 PositionedSceneElement getNext()
           
 Picture getPicture()
          Returns the picture in the node.
 void insertAfter(PositionedSceneElement node)
          Insert the input node after this node.
 PositionedSceneElement last()
          Return the last element in the list
 void remove(PositionedSceneElement node)
          Method to remove node from list, fixing links appropriately.
 void replace(Picture oldPic, Picture newPic)
          Replace the one picture with the other picture in all the elements from me on.
 void setNext(PositionedSceneElement nextOne)
          Methods to set and get next elements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionedSceneElement

public PositionedSceneElement(Picture heldPic)
Make a new element with a picture as input, and next as null.

Parameters:
heldPic - Picture for element to hold
Method Detail

setNext

public void setNext(PositionedSceneElement nextOne)
Methods to set and get next elements

Parameters:
nextOne - next element in list

getNext

public PositionedSceneElement getNext()

getPicture

public Picture getPicture()
Returns the picture in the node.

Returns:
the picture in the node

drawFromMeOn

public void drawFromMeOn(Picture bg)
Method to draw from this node on in the list, using bluescreen. Each new element has it's lower-left corner at the lower-right of the previous node. Starts drawing from left-bottom

Parameters:
bg - Picture to draw drawing on

remove

public void remove(PositionedSceneElement node)
Method to remove node from list, fixing links appropriately.

Parameters:
node - element to remove from list.

insertAfter

public void insertAfter(PositionedSceneElement node)
Insert the input node after this node.

Parameters:
node - element to insert after this.

copy

public PositionedSceneElement copy()

replace

public void replace(Picture oldPic,
                    Picture newPic)
Replace the one picture with the other picture in all the elements from me on. Decide two pictures are equal if come from same filename

Parameters:
oldPic - Picture to be replaced
newPic - Picture to put in its place

last

public PositionedSceneElement last()
Return the last element in the list