|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.media.core.ClipControl org.opensourcephysics.media.core.VideoClipControl
public class VideoClipControl
This is a ClipControl that uses the video itself for timing.
Field Summary |
---|
Fields inherited from class org.opensourcephysics.media.core.ClipControl |
---|
clip, looping, rate, stepNumber, support, timeStretch, video |
Constructor Summary | |
---|---|
protected |
VideoClipControl(VideoClip videoClip)
Constructs a VideoClipControl. |
Method Summary | |
---|---|
void |
back()
Steps back one step. |
void |
dispose()
Removes this listener from the video so it can be garbage collected. |
int |
getFrameNumber()
Gets the current frame number. |
static XML.ObjectLoader |
getLoader()
Returns an XML.ObjectLoader to save and load data for this class. |
double |
getMeanFrameDuration()
Gets the mean frame duration in milliseconds. |
double |
getRate()
Gets the play rate. |
int |
getStepNumber()
Gets the step number. |
double |
getStepTime(int stepNumber)
Gets the start time of the specified step measured from step 0. |
double |
getTime()
Gets the current time in milliseconds measured from step 0. |
boolean |
isLooping()
Gets the looping status. |
boolean |
isPlaying()
Gets the playing status. |
void |
play()
Plays the clip. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Responds to property change events. |
void |
setFrameDuration(double duration)
Sets the frame duration. |
void |
setLooping(boolean loops)
Turns on/off looping. |
void |
setRate(double newRate)
Sets the play rate. |
void |
setStepNumber(int n)
Sets the step number. |
void |
step()
Steps forward one step. |
void |
stop()
Stops at the next step. |
Methods inherited from class org.opensourcephysics.media.core.ClipControl |
---|
addPropertyChangeListener, addPropertyChangeListener, getControl, getVideoClip, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected VideoClipControl(VideoClip videoClip)
videoClip
- the video clipMethod Detail |
---|
public void play()
play
in class ClipControl
public void stop()
stop
in class ClipControl
public void step()
step
in class ClipControl
public void back()
back
in class ClipControl
public void setStepNumber(int n)
setStepNumber
in class ClipControl
n
- the desired step numberpublic int getStepNumber()
getStepNumber
in class ClipControl
public void setRate(double newRate)
setRate
in class ClipControl
newRate
- the desired ratepublic double getRate()
getRate
in class ClipControl
public void setLooping(boolean loops)
setLooping
in class ClipControl
loops
- true
to turn looping onpublic boolean isLooping()
isLooping
in class ClipControl
true
if looping is onpublic int getFrameNumber()
getFrameNumber
in class ClipControl
public boolean isPlaying()
isPlaying
in class ClipControl
true
if playingpublic double getTime()
getTime
in class ClipControl
public double getStepTime(int stepNumber)
getStepTime
in class ClipControl
stepNumber
- the step number
public void setFrameDuration(double duration)
setFrameDuration
in class ClipControl
duration
- the desired frame duration in millisecondspublic double getMeanFrameDuration()
getMeanFrameDuration
in class ClipControl
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
e
- the property change eventpublic void dispose()
dispose
in class ClipControl
public static XML.ObjectLoader getLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |