public class Screen extends Visualization implements MetronomeListener
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_FRAME_DELAY |
Constructor and Description |
---|
Screen()
Default Constructor.
|
Screen(int frameRate)
Explicit Value Constructor.
|
Screen(Metronome metronome)
Explicit Value Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSuperimposition(Superimposition si)
Add a Superimposition.
|
void |
addTransition(Transition t)
Add a Transition.
|
int |
getFrameNumber()
Get the number of the current frame.
|
Metronome |
getMetronome()
Get the Metronome being used by this Screen.
|
java.util.Iterator<Superimposition> |
getSuperimpositions()
Get the current superimpositions (if any).
|
java.util.Iterator<Transition> |
getTransitions()
Get the current transitions (if any).
|
void |
handleTick(int time)
Handle tick events (required by MetronomeListener).
|
java.util.Iterator<SimpleContent> |
iterator()
Get an Iterator that contains the current SimpleContent
object.
|
java.util.Iterator<SimpleContent> |
iterator(boolean all)
Get an Iterator that contains either all of the SimpleContent
objects or the current SimpleContent Object.
|
void |
setRepeating(boolean repeating)
Set whether this presentation should repeat/loop.
|
void |
start()
Start the presentation.
|
void |
stop()
Stop the presentation.
|
add, addKeyListener, addMouseListener, addMouseMotionListener, addView, clear, getView, getViews, remove, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeView, repaint, setBackground, setView, toBack, toFront
public static final int DEFAULT_FRAME_DELAY
public Screen()
public Screen(int frameRate)
frameRate
- The frame rate to usepublic Screen(Metronome metronome)
metronome
- The Metronome to usepublic void addSuperimposition(Superimposition si)
Note: This method does not ensure that the order is correct.
si
- The Superimposition to addpublic void addTransition(Transition t)
Note: This method does not ensure that the order is correct
t
- The Transition to addpublic int getFrameNumber()
public java.util.Iterator<Superimposition> getSuperimpositions()
public java.util.Iterator<Transition> getTransitions()
public Metronome getMetronome()
public void handleTick(int time)
Specifically, make the current frame the "current" Content and call repaint() to start the rendering process.
handleTick
in interface MetronomeListener
time
- The current time (in millis)public java.util.Iterator<SimpleContent> iterator()
iterator
in class Visualization
public java.util.Iterator<SimpleContent> iterator(boolean all)
all
- true to get all frames; false to get the current framepublic void setRepeating(boolean repeating)
repeating
- true to repeat/loop; false otherwisepublic void start()
public void stop()