public class Timetable
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Timetable.Event
Event is an inner class associated with the Timetable class.
|
class |
Timetable.Player
Creates a Thread to run playback of recorded Events.
|
Constructor and Description |
---|
Timetable()
Constructs a new Timetable.
|
Modifier and Type | Method and Description |
---|---|
void |
addEvent(long id,
float x,
float y)
Inserts add event data into this Timetable.
|
void |
addEvent(long id,
float x,
float y,
long d)
Inserts add event data into this Timetable at the specified time.
|
void |
append(Timetable t)
Appends another Timetable to the end of this Timetable for playback.
|
void |
clearEvents()
Clears all events from this Timetable.
|
Contactable |
getContactee()
Returns a reference to the contactee associated with this Timetable.
|
int |
getEventCount()
Gets the total number of events in this Timetable.
|
java.util.PriorityQueue<Timetable.Event> |
getEventQueue()
Returns the main event queue associated with this Timetable.
|
Timetable.Event[] |
getEvents()
Returns an array of Events associated with this Timetable.
|
java.lang.String |
getLabel()
Gets the label for this Timetable.
|
long |
getPlaybackTime()
Returns the elapsed playback time in naonseconds.
|
long |
getRecordTime()
Returns the elapsed recorded time in nanoseconds.
|
boolean |
isLooping()
Returns true if the playback of this Timetable is looping.
|
boolean |
isPlaying()
Returns true if this Timetable is currently playing.
|
boolean |
isRecording()
Returns true if this Timetable is currently recording.
|
void |
loopPlayback()
Loops the playback of Events.
|
void |
remove(Timetable t)
Removes the specified Timetable from the playback queue for this Timetable.
|
void |
removeEvent(long id)
Inserts remove event data into this Timetable.
|
void |
removeEvent(long id,
long d)
Inserts remove event data into this Timetable at the specified time.
|
void |
setContactee(Contactable c)
Sets a contactee that will be attached to this Timetable.
|
void |
setLabel(java.lang.String l)
Sets the label for this Timetable.
|
void |
startLooping()
Starts the looping state.
|
void |
startPlayback()
Starts the playback of Events.
|
void |
startRecording()
Starts recording Events for an attached contactee.
|
void |
stopLooping()
Stops the looping state.
|
void |
stopPlayback()
Stops playback of Events.
|
void |
stopRecording()
Stops recording Events.
|
void |
updateEvent(long id,
float x,
float y)
Inserts update event data into this Timetable.
|
void |
updateEvent(long id,
float x,
float y,
long d)
Inserts update event data into this Timetable at the specified time.
|
public Timetable()
public void setLabel(java.lang.String l)
l
- the label Stringpublic java.lang.String getLabel()
public void setContactee(Contactable c)
c
- an object that implements contacteepublic Contactable getContactee()
public void startRecording()
public void stopRecording()
public boolean isRecording()
public long getRecordTime()
public void startPlayback()
public void stopPlayback()
public boolean isPlaying()
public void loopPlayback()
public void startLooping()
public void stopLooping()
public boolean isLooping()
public long getPlaybackTime()
public void addEvent(long id, float x, float y)
id
- the event identifierx
- the center x valuey
- the center y valuepublic void addEvent(long id, float x, float y, long d)
id
- the event identifierx
- the center x valuey
- the center y valued
- the nanosecond countpublic void updateEvent(long id, float x, float y)
id
- the event identifierx
- the current center x valuey
- the current center y valuepublic void updateEvent(long id, float x, float y, long d)
id
- id the event identifierx
- the current center x valuey
- the current center y valued
- the nanosecond countpublic void removeEvent(long id)
id
- the event identifierpublic void removeEvent(long id, long d)
id
- the event identifierd
- the nanosecond countpublic int getEventCount()
public void clearEvents()
public java.util.PriorityQueue<Timetable.Event> getEventQueue()
public Timetable.Event[] getEvents()
public void append(Timetable t)
t
- the Timetable to appendpublic void remove(Timetable t)
t
- the Timetable to remove