|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.media.bean.playerbean.MediaPlayer
MediaPlayer
encapsulates a player in a
JavaBeansTM component.
MediaPlayer
implements the Player
and Externalizable
interfaces.
A MediaPlayer
can be used as a
full-featured Player
with either the default Player
controls or
custom controls.
MediaPlayer
Properties
The following bean properties are supported by MediaPlayer
:
http://xena/demo/media/Sample1.mov
or an address relative to the codebase address such as media/Sample1.mov
MediaPlayer
.
MediaPlayer
.
Two additional properties can be set. These are not bean properties, but provide additional control over the presentation:
MediaPlayer
You can instantiate MediaPlayer directly or using a bean-enabled IDE tool such as NetObjects
BeanBuilder. To instantiate MediaPlayer
directly:
ClassLoader cl = this.getClass().getClassLoader(); MediaPlayer pb = (MediaPlayer)Beans.instantiate(cl, "javax.media.bean.playerbean.MediaPlayer");
Field Summary | |
protected java.lang.String |
curVolumeLevel
|
protected float |
curVolumeValue
|
protected java.lang.String |
curZoomLevel
|
protected float |
curZoomValue
|
protected GainControl |
gainControl
|
protected Time |
mediaTime
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Fields inherited from interface javax.media.Controller |
LATENCY_UNKNOWN,
Prefetched,
Prefetching,
Realized,
Realizing,
Started,
Unrealized |
Fields inherited from interface javax.media.Clock |
RESET |
Fields inherited from interface javax.media.Duration |
DURATION_UNBOUNDED,
DURATION_UNKNOWN |
Constructor Summary | |
MediaPlayer()
Constructs a MediaPlayer with its main panel preparing for caching control events and the following visual display. |
Method Summary | |
void |
addController(Controller n)
Tells the Player to assume control of another Controller . |
void |
addControllerListener(ControllerListener listener)
Specifies a ControllerListener to which
this Controller will send events. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener c)
Adds a PropertyChangeListener to the listener list. |
void |
close()
Releases all resources and cease all activity. |
void |
deallocate()
Aborts the current operation and cease any activity that consumes system resources. |
Control |
getControl(java.lang.String forName)
Gets the Control that supports the specified
class or interface. |
java.awt.Component |
getControlPanelComponent()
Gets the Component that provides the default user
interface for controlling this Player . |
int |
getControlPanelHeight()
Gets the height of the control Component for this MediaPlayer . |
Control[] |
getControls()
Gets a list of the Control objects supported by
this Controller . |
Time |
getDuration()
Get the duration of the media represented by this object. |
GainControl |
getGainControl()
Gets the object for controlling this Player's
audio gain. |
java.lang.String |
getMediaLocation()
Gets the value of the media location property for this MediaPlayer . |
int |
getMediaLocationHeight()
Gets the height of the media-location text field for this MediaPlayer . |
protected MediaLocator |
getMediaLocator(java.lang.String filename)
Gets a MediaLocator for this MediaPlayer
that corresponds to the specified String . |
long |
getMediaNanoseconds()
Gets the current media time in nanoseconds. |
Time |
getMediaTime()
Gets this Clock's current media time. |
boolean |
getPlaybackLoop()
Gets the loop property for this MediaPlayer . |
Player |
getPlayer()
Gets the current Player for this MediaPlayer . |
java.awt.Dimension |
getPreferredSize()
Gets the dimensions of the preferred size. |
float |
getRate()
Gets the current temporal scale factor. |
Time |
getStartLatency()
Gets the Controller's start latency in nanoseconds. |
int |
getState()
Gets the current state of this Controller . |
Time |
getStopTime()
Gets the last value successfully set by setStopTime . |
Time |
getSyncTime()
Gets the current media time or the time until this Clock will synchronize to its TimeBase . |
int |
getTargetState()
Gets the current target state of this Controller . |
TimeBase |
getTimeBase()
Gets the TimeBase that this Clock is using. |
java.awt.Component |
getVisualComponent()
Gets the display Component for this Player . |
java.lang.String |
getVolumeLevel()
Gets the audio volume property for this MediaPlayer . |
java.lang.String |
getZoomTo()
Gets the zoom property for this MediaPlayer . |
boolean |
isCachingControlVisible()
Gets the caching control visibility property for this MediaPlayer . |
boolean |
isControlPanelVisible()
Gets the control panel visibility property for this MediaPlayer . |
boolean |
isFixedAspectRatio()
Gets the fixed aspect ratio property for this MediaPlayer . |
boolean |
isMediaLocationVisible()
Gets the MediaLocationVisible property for this MediaPlayer . |
boolean |
isPlayBackLoop()
Gets the loop property for this MediaPlayer . |
Time |
mapToTimeBase(Time t)
Gets the TimeBase time corresponding to the specified media time. |
void |
prefetch()
Processes as much data as necessary to reduce the Controller's start latency to the shortest possible time. |
void |
readExternal(java.io.ObjectInput in)
Restores the contents of this object |
void |
realize()
Constructs the media dependent portions of the Controller . |
void |
removeController(Controller old)
Tells the Player to stop controlling a Controller . |
void |
removeControllerListener(ControllerListener listener)
Removes the specified listener from this Controller's
listener list. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener c)
Removes a PropertyChangeListener from the listener list. |
void |
restoreMediaTime()
Restores the media time saved by saveMediaTime
so that the video resumes from the time it was stoped. |
void |
saveMediaTime()
Saves the media stop time to a variable. |
void |
setBounds(int x,
int y,
int w,
int h)
Resizes the visual Component , control Component ,
and urlName according to the specified dimensions. |
void |
setCachingControlVisible(boolean isVisible)
Sets the caching control visibility property for this MediaPlayer . |
void |
setCodeBase(java.net.URL cb)
Sets the codebase of the running applet. |
void |
setControlPanelVisible(boolean isVisible)
Sets the control panel visibility property for this MediaPlayer . |
void |
setDataSource(DataSource ds)
Sets the DataSource for this MediaPlayer . |
void |
setFixedAspectRatio(boolean isFixed)
Sets the fixed aspect ratio property for this MediaPlayer . |
void |
setMediaLocation(java.lang.String location)
Sets the media location property for this MediaPlayer . |
void |
setMediaLocationVisible(boolean val)
Sets the MediaLocationVisible property for this MediaPlayer . |
void |
setMediaLocator(MediaLocator locator)
Sets the MediaLocator for this MediaPlayer . |
void |
setMediaTime(Time now)
Sets the Clock's media time. |
void |
setPlaybackLoop(boolean val)
Sets the loop property for this MediaPlayer . |
void |
setPlayer(Player newPlayer)
Specifies an existing Player to use to present media
for this MediaPlayer . |
void |
setPopupActive(boolean isActive)
Specifies whether or not the Zoom Popup Menu is active. |
float |
setRate(float factor)
Sets the temporal scale factor. |
void |
setSource(DataSource data)
Sets the media source this MediaHandler
should use to obtain content. |
void |
setStopTime(Time stopTime)
Sets the media time at which you want the Clock
to stop. |
void |
setTimeBase(TimeBase master)
Sets the TimeBase for this Clock . |
void |
setVolumeLevel(java.lang.String volumeString)
Sets the audio volume property for this MediaPlayer . |
void |
setZoomTo(java.lang.String scale)
Sets the zoom property for this MediaPlayer . |
void |
start()
Starts the MediaPlayer as soon as possible. |
void |
stop()
Stops the Clock . |
void |
stopAndDeallocate()
Stops the clock and deallocates the system resources used by this player. |
void |
syncStart(Time at)
Synchronizes the current media time to the specified time-base time and start the Clock . |
void |
waitForState(int s)
Ensures the ability to synchronously change state. |
void |
writeExternal(java.io.ObjectOutput out)
Saves the contents of this object by calling the ObjectOutput
writeObject method. |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
addNotify,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paint,
paintComponents,
paramString,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setCursor,
setFont,
setLayout,
update,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setComponentOrientation,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected transient GainControl gainControl
protected transient java.lang.String curVolumeLevel
protected transient float curVolumeValue
protected transient java.lang.String curZoomLevel
protected transient float curZoomValue
protected transient Time mediaTime
Constructor Detail |
public MediaPlayer()
Method Detail |
public java.lang.String getMediaLocation()
MediaPlayer
.String
that contains the media location.protected MediaLocator getMediaLocator(java.lang.String filename)
MediaLocator
for this MediaPlayer
that corresponds to the specified String
.filename
- A String
that contains the media name
from which to create the MediaLocator
.MediaLocator
that corresponds to the specified String
.public void setMediaLocation(java.lang.String location)
MediaPlayer
.
This property specifies the location of the media file to be
presented by the MediaPlayer
.
If a Player
already exists for this MediaPlayer
,
this method stops that Player
and releases all
of the resources it is using. Then a new Player
is created to
present the specified media file.
All controller listeners registered for the old
Player
are added to the listener list of the new Player
.location
- A String
that contains the location of the media file.public void setMediaLocator(MediaLocator locator)
MediaLocator
for this MediaPlayer
. This
method creates a Player
for the specified MediaLocator
.
If a Player
already exists for this MediaPlayer
,
this method stops that Player
and releases all
of the resources it is using. Then a new Player
is created with
the specified MediaLocator
.
All controller listeners registered for the old
Player
are added to the listener list of the new Player
.locator
- A MediaLocator
that identifies the media file to be
presented by the MediaPlayer
.public void setDataSource(DataSource ds)
DataSource
for this MediaPlayer
. This
method creates a Player
for the specified DataSource
.
If a Player
already exists for this MediaPlayer
,
this method stops that Player
and releases all
of the resources it is using. Then a new Player
is created with
the specified DataSource
.
All controller listeners registered for the old
Player
are added to the listener list of the new Player
.ds
- A DataSource
that identifies the media file to be
presented by the MediaPlayer
.public void setPlayer(Player newPlayer)
Player
to use to present media
for this MediaPlayer
.
If a Player
already exists for this MediaPlayer
,
this method stops that Player
and releases all
of the resources it is using.
All controller listeners registered for the old
Player
are added to the listener list of the new Player
.newPlayer
- The Player
to use to present media data for
this MediaPlayer
.public boolean getPlaybackLoop()
MediaPlayer
. This property indicates
whether the MediaPlayer
should play the media stream
repeatedly or stop when the end of media is reached.true
if loop is enabled, false
if the media stream
is to be played only once.public void setPlaybackLoop(boolean val)
MediaPlayer
. This property indicates
whether the MediaPlayer
should play the media stream
repeatedly or stop when the end of media is reached.val
- The boolean value for the loop property. Specify true
to enable looping, false
if the media stream
is to be played only once.public boolean isPlayBackLoop()
MediaPlayer
. This property indicates
whether the MediaPlayer
should play the media stream
repeatedly or stop when the end of media is reached.true
if loop is enabled, false
if the media stream
is to be played only once.public void setZoomTo(java.lang.String scale)
MediaPlayer
. This property specifies
a scale factor for the visual components. When zoom
is called, the
visual components are resized accordingly.scale
- A String
that specifies the zoom factor. Possible values are
Scale 1:2
, Scale 1:1
, Scale 2:1
,
and Scale 4:1
.public java.lang.String getZoomTo()
MediaPlayer
. This property specifies
a scale factor for the visual components.String
that specifies the zoom factor. Possible values are
Scale 1:2
, Scale 1:1
, Scale 2:1
,
and Scale 4:1
.public int getControlPanelHeight()
Component
for this MediaPlayer
.Component
height as an integer.public int getMediaLocationHeight()
MediaPlayer
.public void setVolumeLevel(java.lang.String volumeString)
MediaPlayer
.
The volume can range from zero to five, where zero is silence
and five is the maximum volume.volumeString
- A String
that represents the audio volume.
Possible values are "0", "1", "2", "3", "4", or "5".public java.lang.String getVolumeLevel()
MediaPlayer
.
The volume can range from zero to five, where zero is silence
and five is the maximum volume.String
that represents the audio volume.
Possible values are "0", "1", "2", "3", "4", or "5".public boolean isMediaLocationVisible()
MediaPlayer
.true
if the media location is visible at runtime,
false
if it is not.public void setMediaLocationVisible(boolean val)
MediaPlayer
.val
- A boolean that indicates whether or not the media location is visible.
Set to true
if the media location is visible at runtime,
false
if it is not.public boolean isControlPanelVisible()
MediaPlayer
.
This property indicates whether or not the control panel is visible at runtime.true
if the control panel is visible at runtime,
false
if it is not.public void setControlPanelVisible(boolean isVisible)
MediaPlayer
.
This property indicates whether or not the control panel is displayed at runtime.isVisible
- A boolean value that indicates whether or not the control panel
should be displayed. Set to true
to display the control panel.public boolean isCachingControlVisible()
MediaPlayer
.
This property indicates whether or not the caching control is displayed at runtime.
The caching control displays the download progress for media accessed over the network.true
if the control panel is displayed at runtime,
false
if it is not.public void setCachingControlVisible(boolean isVisible)
MediaPlayer
.
This property indicates whether or not the caching control is displayed at runtime.
The caching control displays the download progress for media accessed over the network.isVisible
- A boolean value that indicates whether or not the caching control
should be displayed at
runtime. Set to true
to display the control.public boolean isFixedAspectRatio()
MediaPlayer
. This
property indicates whether or not the aspect ratio of the video
is maintained when the visual component is resized.true
if it is, false
if it is not.public void setFixedAspectRatio(boolean isFixed)
MediaPlayer
. This
property indicates whether or not the aspect ratio of the video
is maintained when the visual component is resized.isFixed
- A boolean value that indicates whether or not the aspect
ratio should be maintained.
Set to true
to maintain the aspect ratio.public void setPopupActive(boolean isActive)
setPopupActive
is set to false, the popup menu won't be created.isActive
- A boolean value that indicates whether or not the popup menu
should be created.
Set to true
to activate the popup menu.public java.awt.Component getVisualComponent()
Component
for this Player
.
The display Component
is where visual media
is rendered.
If this Player
has no visual component,
getVisualComponent
returns null
.
For example, getVisualComponent
might return
null
if the Player
only plays audio.Component
for this
Player
.public GainControl getGainControl()
Player's
audio gain.
If this player does not have a
GainControl
, getGainControl
returns
null
.
For example, getGainControl
might return
null
if the Player
does not play audio data.GainControl
object for this
Player
.public java.awt.Component getControlPanelComponent()
Component
that provides the default user
interface for controlling this Player
.
If this Player
has no default control panel,
getControlPanelComponent
returns null
.Player
.public void start()
MediaPlayer
as soon as possible. If the MediaPlayer
does
not already have a Player
,
it creates one and then
starts it.public void addController(Controller n)
Player
to assume control of another Controller
.newController
- The Controller
to be managed.Controller
cannot take this
Player's
TimeBase
.public Player getPlayer()
Player
for this MediaPlayer
.Player
that this MediaPlayer
is currently using.public void removeController(Controller old)
Player
to stop controlling a Controller
.oldController
- The Controller
to stop managing.public void setSource(DataSource data)
MediaHandler
should use to obtain content.source
- The DataSource
used
by this MediaHandler
.DataSource
MediaHandler
cannot make use
of the DataSource
.public int getState()
Controller
.
The state is an integer constant as defined above.
Note: A race condition can occur between the return of this method and the execution of a state changing method.
Controller's
current state.public int getTargetState()
Controller
.
The state is an integer constant as defined above.
Note: A race condition can occur between the return of this method and the execution of a state changing method.
Controller's
current target state.public void realize()
Controller
.
This may include examining media data and might
take some time to complete.
The realize
method puts the Controller
into the Realizing state and returns immediately.
When realize
is complete and the Controller
is in the
Realized state, the Controller
posts a
RealizeCompleteEvent
.
public void prefetch()
Controller's
start latency to the shortest possible time.
This typically involves examining media data and takes some
time to complete.
The prefetch
method puts the Controller
into the Prefetching state and returns immediately.
When Prefetching is complete and the Controller
is in
the Prefetched state, the Controller
posts
a PrefetchCompleteEvent
.
public void deallocate()
Controller
is not yet
Realized,
it returns to the Unrealized state. Otherwise, the Controller
returns to the Realized state.
It is illegal to call deallocate
on a Started Controller
.
A ClockStartedError
is thrown if deallocate
is called and the Controller
is in the Started state.
public void close()
close
method indicates that the Controller
will
no longer be used and can
shut itself down.
A ControllerClosedEvent
is posted.
Methods invoked on a closed Controller
might throw errors.public Time getStartLatency()
Controller's
start latency in nanoseconds. The start latency represents a
worst-case estimate of the amount of time it will take
to present the first frame of data.
This method is useful for determining how far in advance the
syncStart
method must be invoked to ensure
that media will be
rendered at the specified start time.
For a Controller
that has a variable start latency,
the value returned represents the maximum possible
start latency. If you call getStartLatency
on a Controller
that isn't Prefetched
and getStartLatency
returns LATENCY_UNKNOWN
, calling
prefetch
and then calling getStartLatency
again after the Controller
posts
a PrefetchCompleteEvent
might
return a more accurate estimate.
If getStartLatency
still returns LATENCY_UNKNOWN
,
the start latency is indeterminate and you might not be able to use
syncStart
to
synchronize the Controller
with other Controllers
.
Note: In most cases, the value returned by
getStartLatency
will change once the
Controller
is Prefetched.
public Control[] getControls()
Control
objects supported by
this Controller
.
If there are no controls, an array of length zero
is returned.Controller
Controls
.public Control getControl(java.lang.String forName)
Control
that supports the specified
class or interface. The full class
or interface name should be specified.
Null
is returned if the Control
is not supported.Control
for the class or interface
name.public void addControllerListener(ControllerListener listener)
ControllerListener
to which
this Controller
will send events.
A Controller
can have multiple
ControllerListeners
.listener
- The listener to which the Controller
will post events.public void removeControllerListener(ControllerListener listener)
Controller's
listener list.listener
- The listener that has been receiving events from this
Controller
.public void setTimeBase(TimeBase master)
TimeBase
for this Clock
.
This method can only be called on a
Stopped Clock
.
A ClockStartedError
is thrown if
setTimeBase
is called on a Started
Clock
.
A Clock
has a default TimeBase
that
is determined by the implementation.
To reset a Clock
to its default
TimeBase
, call setTimeBase(null)
.
master
- The new TimeBase
or null
to reset the Clock
to its default TimeBase
.Clock
can't use the specified TimeBase
.public void syncStart(Time at)
Clock
.
The syncStart
method sets the time-base start-time,
and puts the Clock
in the Started state.
This method can only be called on a
Stopped Clock
.
A ClockStartedError
is thrown if
setTimeBase
is called on a Started
Clock
.at
- The time-base time to equate with the
current media time.public void stop()
Clock
.
Calling stop
releases the Clock
from
synchronization with the TimeBase
.
After this request is issued, the Clock
is in the
Stopped state.
If stop
is called on
a Stopped Clock
, the request is ignored.public void stopAndDeallocate()
public void setStopTime(Time stopTime)
Clock
to stop.
The Clock
will stop when its media time
passes the stop-time.
To clear the stop time, set it to: Clock.RESET
.
You can always call setStopTime
on a Stopped
Clock
.
On a Started Clock
, the stop-time can only
be set once.
A StopTimeSetError
is thrown if setStopTime
is called and the media stop-time has already been set.
stopTime
- The time at which you want the
Clock
to stop, in media time.public Time getStopTime()
setStopTime
.
Returns the constant Clock.RESET
if no stop time is set.
(Clock.RESET
is the default stop time.)public void setMediaTime(Time now)
Clock's
media time.
This method can only be called on
a Stopped Clock
.
A ClockStartedError
is thrown if
setMediaTime
is called on a Started
Clock
.now
- The new media time.public Time getMediaTime()
Clock's
current media time.
A Started Clock's
media time
is based on its TimeBase
and rate, as described in Starting a Clock.public long getMediaNanoseconds()
public Time getSyncTime()
Clock
will synchronize to its TimeBase
.
The getSyncTime
method is used by Players
and
advanced applet writers to synchronize Clocks
.
Like getMediaTime
, this method returns
the Clock's
current media time,
which is based on its TimeBase
and rate.
However, when syncStart
is used to start
the Clock
, getSyncTime
performs a countdown
to the time-base start-time, returning the time remaining until
the time-base start-time.
Once the TimeBase
reaches the
time-base start-time, getSyncTime
and getMediaTime
will return the same value.
public TimeBase getTimeBase()
TimeBase
that this Clock
is using.public Time mapToTimeBase(Time t)
TimeBase
time corresponding to the specified media time.t
- The media time to map from.mapToTimeBase
is called on a Stopped
Clock
.public float getRate()
Clock's
media time
and its TimeBase
.
For example, a rate of 2.0 indicates that media time
will pass twice as fast as the TimeBase
time once
the Clock
starts. Similarly, a negative rate indicates that
the Clock
runs in the opposite direction of its TimeBase
.
All Clocks
are
guaranteed to support a rate of 1.0, the default rate. Clocks
are not required
to support any other rate.
public float setRate(float factor)
The setRate
method returns the actual rate set by the
Clock
. Clocks
should set their rate as close to
the requested
value as possible, but are not required to set the rate to the exact
value of any argument other than 1.0. A Clock
is only guaranteed to set
its rate exactly to 1.0.
You can only call this method on a Stopped Clock
. A
ClockStartedError
is thrown if setRate
is called on a Started Clock
.
factor
- The temporal scale factor (rate) to set.public Time getDuration()
getDuration
returns DURATION_UNKNOWN
.Time
object representing the duration or DURATION_UNKNOWN.public void waitForState(int s)
s
- The state to wait for. The state constants are defined in Controller
.Controller.Unrealized
,
Controller.Realizing
,
Controller.Unrealized
,
Controller.Realized
,
Controller.Prefetching
,
Controller.Prefetched
,
Controller.Started
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- The stream that can read primitive and object
data types.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
ObjectOutput
writeObject
method.out
- The stream that can read primitive and object
data types.public void setBounds(int x, int y, int w, int h)
Component
, control Component
,
and urlName
according to the specified dimensions.x
- The x coordinate of the rectangle.y
- The y coordinate of the rectangle.w
- The width of the rectangle.h
- The height of the rectangle.public java.awt.Dimension getPreferredSize()
Dimension
that represents the preferred size.public void addPropertyChangeListener(java.beans.PropertyChangeListener c)
PropertyChangeListener
to the listener list.c
- The PropertyChangeListener
to be
added.public void removePropertyChangeListener(java.beans.PropertyChangeListener c)
PropertyChangeListener
from the listener list.c
- The PropertyChangeListener
to be
removed.public void setCodeBase(java.net.URL cb)
cb
- The URL
for the codebase of the currently running applet.public void saveMediaTime()
public void restoreMediaTime()
saveMediaTime
so that the video resumes from the time it was stoped.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |