public abstract class ClipControl
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected VideoClip |
clip |
protected boolean |
looping |
static boolean |
playAllSteps |
protected double |
rate |
protected int |
stepNumber |
protected java.beans.PropertyChangeSupport |
support |
protected double |
timeStretch |
protected Video |
video |
| Modifier | Constructor and Description |
|---|---|
protected |
ClipControl(VideoClip videoClip)
Constructs a ClipControl object.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static boolean playAllSteps
protected int stepNumber
protected final VideoClip clip
protected Video video
protected double rate
protected boolean looping
protected java.beans.PropertyChangeSupport support
protected double timeStretch
protected ClipControl(VideoClip videoClip)
videoClip - the video clippublic static ClipControl getControl(VideoClip clip)
clip - the video clippublic 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 numberpublic 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()