|
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uwcse.animation.Stage
Constructor Summary | |
Stage(uwcse.graphics.GWindow window)
Create a new, empty stage, on the given window. |
Method Summary | |
void |
addActor(Actor actor)
Add a new actor to the stage. |
void |
addProp(Prop prop)
Add a new prop to the stage. |
void |
animate()
Run rounds of animation forever. |
void |
animate(int times)
Run a certain number of rounds of animation. |
void |
animateInBackground()
Run rounds of animation forever, in the background. |
void |
animateOneRound()
Run one round of the animation. |
void |
close()
End the animation and close the GWindow |
java.util.ArrayList |
getActors()
Return a list of all the actors. |
int |
getHeight()
Return the height of the stage window. |
java.util.ArrayList |
getProps()
Return a list of all the props. |
int |
getTimeForOneRound()
Get the current amount of time to pause between rounds of animation, in ms. |
int |
getWidth()
Return the width of the stage window. |
uwcse.graphics.GWindow |
getWindow()
Return the window of the stage. |
void |
makeAnimationRoundsAtomic()
Make each round of animation "atomic", in that only after all the doAction operations are done, and all the graphic changes are made, will the final updated scene be displayed. |
void |
quitAnimation()
Quit the animation loop, if it's running. |
void |
quitWhenWindowClosed()
Make it so that the whole animation application will exit when the stage's window is closed. |
void |
registerEventHandler(uwcse.graphics.GWindowEventHandler handler)
Register the handler object that should be notified if there are any input events (e.g., key or mouse button pressed or released). |
void |
removeActor(Actor actor)
Remove an actor from the stage. |
void |
removeProp(Prop prop)
Remove a prop from the stage. |
void |
resumeAnimation()
Resume the animation loop, if was suspended. |
void |
resumeTimerEvents()
Resume delivering timer events at the previous rate, if they were enabled. |
void |
setTimeForOneRound(int newTime)
Set the amount of time to pause between rounds of animation, in ms. |
void |
startTimerEvents(int interval)
Start delivering timer events to the registered event handler. |
void |
stopTimerEvents()
Stop delivering timer events to the registered event handler. |
void |
suspendAnimation()
Suspend the animation loop, if it's running. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Stage(uwcse.graphics.GWindow window)
Method Detail |
public void addActor(Actor actor)
public void addProp(Prop prop)
public void animate()
public void animate(int times)
times
- the number of rounds to run.public void animateInBackground()
public void animateOneRound()
public void close()
public java.util.ArrayList getActors()
public int getHeight()
public java.util.ArrayList getProps()
public int getTimeForOneRound()
public int getWidth()
public uwcse.graphics.GWindow getWindow()
public void makeAnimationRoundsAtomic()
public void quitAnimation()
public void quitWhenWindowClosed()
public void registerEventHandler(uwcse.graphics.GWindowEventHandler handler)
public void removeActor(Actor actor)
public void removeProp(Prop prop)
public void resumeAnimation()
public void resumeTimerEvents()
public void setTimeForOneRound(int newTime)
public void startTimerEvents(int interval)
interval
- the interval in milliseconds between timerExpired events.public void stopTimerEvents()
public void suspendAnimation()
|
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |