|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectLayeredSceneElement
public class LayeredSceneElement
Class that uses a linked list to indicate the layer a picture is in
| Constructor Summary | |
|---|---|
LayeredSceneElement(Picture heldPic,
int xPos,
int yPos)
Make a new element with a picture as input, and next as null, to be drawn at given x,y |
|
| Method Summary | |
|---|---|
void |
add(LayeredSceneElement node)
Add the input node after the last node in this list. |
void |
drawFromMeOn(Picture bg)
Method to draw from this node on in the list, using blueScreen. |
LayeredSceneElement |
getNext()
Method to get the next element |
Picture |
getPicture()
Returns the picture in the node. |
void |
insertAfter(LayeredSceneElement node)
Insert the input node after this node. |
LayeredSceneElement |
last()
Return the last element in the list |
void |
remove(LayeredSceneElement node)
Method to remove node from list, fixing links appropriately. |
LayeredSceneElement |
reverse()
Reverse the list starting at this, and return the last element of the list. |
LayeredSceneElement |
reverse2()
Reverse2: Push all the elements on the stack, then pop all the elements off the stack. |
void |
setNext(LayeredSceneElement nextOne)
Method to set the next element |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LayeredSceneElement(Picture heldPic,
int xPos,
int yPos)
heldPic - Picture for element to holdxPos - x position desired for elementyPos - y position desired for element| Method Detail |
|---|
public void setNext(LayeredSceneElement nextOne)
nextOne - next element in listpublic LayeredSceneElement getNext()
public Picture getPicture()
public void drawFromMeOn(Picture bg)
bg - Picture to draw drawing onpublic void remove(LayeredSceneElement node)
node - element to remove from list.public LayeredSceneElement last()
public LayeredSceneElement reverse()
public LayeredSceneElement reverse2()
public void add(LayeredSceneElement node)
node - element to insert after this.public void insertAfter(LayeredSceneElement node)
node - element to insert after this.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||