|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.media.core.ClipControl
public abstract class ClipControl
A ClipControl controls a VideoClip. This is an abstract class that cannot be instantiated directly.
Field Summary | |
---|---|
protected VideoClip |
clip
|
protected boolean |
looping
|
protected double |
rate
|
protected int |
stepNumber
|
protected java.beans.PropertyChangeSupport |
support
|
protected double |
timeStretch
|
protected Video |
video
|
Constructor Summary | |
---|---|
protected |
ClipControl(VideoClip videoClip)
Constructs a ClipControl object. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener. |
void |
addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener. |
void |
back()
Steps back one step. |
void |
dispose()
Empty dispose method. |
static ClipControl |
getControl(VideoClip clip)
Returns an instance of ClipControl. |
int |
getFrameNumber()
Gets the current frame number. |
abstract double |
getMeanFrameDuration()
Gets the average frame duration in milliseconds. |
double |
getRate()
Gets the play rate. |
int |
getStepNumber()
Gets the step number. |
abstract double |
getStepTime(int stepNumber)
Gets the start time of the specified step measured from step 0. |
abstract double |
getTime()
Gets the current time in milliseconds measured from step 0. |
VideoClip |
getVideoClip()
Gets the clip that is controlled by this clip control. |
boolean |
isLooping()
Gets the looping status. |
abstract boolean |
isPlaying()
Gets the playing status. |
void |
play()
Plays the clip. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener. |
void |
removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener for a specified property. |
abstract 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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int stepNumber
protected final VideoClip clip
protected Video video
protected double rate
protected boolean looping
protected java.beans.PropertyChangeSupport support
protected double timeStretch
Constructor Detail |
---|
protected ClipControl(VideoClip videoClip)
videoClip
- the video clipMethod Detail |
---|
public static ClipControl getControl(VideoClip clip)
clip
- the video clip
public VideoClip getVideoClip()
public void play()
public void stop()
public void step()
public void back()
public void setStepNumber(int n)
n
- the desired step numberpublic int getStepNumber()
public void setRate(double newRate)
newRate
- the desired ratepublic double getRate()
public void setLooping(boolean loops)
loops
- true
to turn looping onpublic boolean isLooping()
true
if looping is onpublic int getFrameNumber()
public abstract boolean isPlaying()
true
if playingpublic abstract double getTime()
public abstract double getStepTime(int stepNumber)
stepNumber
- the step number
public abstract void setFrameDuration(double duration)
duration
- the desired frame duration in millisecondspublic abstract double getMeanFrameDuration()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the object requesting property change notificationpublic void addPropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
property
- the name of the property of interestlistener
- the object requesting property change notificationpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener requesting removalpublic void removePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
property
- the name of the propertylistener
- the listener to removepublic void dispose()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |