|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisual.Visualization
visual.dynamic.described.Stage
public class Stage
A Visualization that contains Sprite objects
Constructor Summary | |
---|---|
Stage(int timeStep)
Explicit Value Constructor |
|
Stage(int timeStep,
Metronome metronome)
Explicit Value Constructor |
Method Summary | |
---|---|
void |
add(Sprite sprite)
Add a Sprite to this Stage |
Metronome |
getMetronome()
Get the Metronome that this Stage is using |
void |
handleTick(int time)
Handle "tick" events (required by MetronomeTickListener)> |
void |
remove(Sprite sprite)
Remove a Sprite from this Stage |
void |
setRestartTime(int restartTime)
Set the time at which the Stage should restart |
void |
start()
Start the Stage |
void |
stop()
Stop the Stage |
Methods inherited from class visual.Visualization |
---|
add, addKeyListener, addMouseListener, addMouseMotionListener, addView, clear, createDefaultView, getView, getViews, iterator, remove, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeView, repaint, setBackground, setView, toBack, toFront |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Stage(int timeStep)
timeStep
- Amount of time between ticks (in milliseconds)public Stage(int timeStep, Metronome metronome)
timeStep
- Amount of time between ticks (in milliseconds)metronome
- The Metronome to useMethod Detail |
---|
public void add(Sprite sprite)
sprite
- The Sprite to addpublic Metronome getMetronome()
public void handleTick(int time)
handleTick
in interface MetronomeListener
time
- The time of the "tick"public void remove(Sprite sprite)
sprite
- The Sprite to removepublic void setRestartTime(int restartTime)
restartTime
- In milliseconds (negative to not restart)public void start()
public void stop()
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |