public interface Playable
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this object.
|
void |
addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this object.
|
double |
getDuration()
Gets the duration of the media.
|
double |
getEndTime()
Gets the end time in milliseconds.
|
double |
getRate()
Gets the rate at which the media plays relative to its normal rate.
|
double |
getStartTime()
Gets the start time in milliseconds.
|
double |
getTime()
Gets the current media time in milliseconds.
|
void |
goToEnd()
Sets the time to the end time.
|
void |
goToStart()
Sets the time to the start time.
|
boolean |
isLooping()
Gets the looping behavior of the media.
|
boolean |
isPlaying()
Gets whether the media is playing.
|
void |
play()
Plays the media.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from this object.
|
void |
removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from this object.
|
void |
reset()
Resets the media.
|
void |
setEndTime(double millis)
Sets the end time in milliseconds.
|
void |
setLooping(boolean looping)
Sets the looping behavior of the media.
|
void |
setPlaying(boolean playing)
Starts and stops the media.
|
void |
setRate(double rate)
Sets the rate at which the media plays relative to its normal rate.
|
void |
setStartTime(double millis)
Sets the start time in milliseconds.
|
void |
setTime(double millis)
Sets the media time in milliseconds.
|
void |
stop()
Stops the media.
|
void play()
void stop()
void reset()
double getTime()
void setTime(double millis)
millis
- the desired time in millisecondsdouble getStartTime()
void setStartTime(double millis)
millis
- the desired start time in millisecondsdouble getEndTime()
void setEndTime(double millis)
millis
- the desired end time in millisecondsvoid goToStart()
void goToEnd()
double getDuration()
double getRate()
void setRate(double rate)
rate
- the relative play rate. A rate of 1.0 plays at the normal rate.void setPlaying(boolean playing)
playing
- true
starts the media, and
false
stops itboolean isPlaying()
true
if the media is playingvoid setLooping(boolean looping)
looping
- true
if the media is loopingboolean isLooping()
true
if the media is loopingvoid addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener requesting property change notificationvoid addPropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
property
- the name of the property of interest to the listenerlistener
- the listener requesting property change notificationvoid removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener requesting removalvoid removePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
property
- the name of the property of interest to the listenerlistener
- the listener requesting removal