javax.media
类 ControllerAdapter
java.lang.Object
javax.media.ControllerAdapter
- 所有已实现的接口:
- java.util.EventListener, ControllerListener
public class ControllerAdapter
- extends java.lang.Object
- implements ControllerListener, java.util.EventListener
The event adapter which recieves ControllerEvents
and
dispatches them to an appropriate stub-method. Classes that extend
this adapter can easily replace only the message handlers they are
interested in.
For example, the following code extends a ControllerAdapter with a JDK
1.1 anonymous inner-class to make a self-contained player that
resets itself back to the beginning and deallocates itself when the
player reaches the end of the media:
player.addControllerListener(new ControllerAdapter() {
public void endOfMedia(EndOfMediaEvent e) {
Controller controller = e.getSource();
controller.stop();
controller.setMediaTime(0);
controller.deallocate();
}
});
- 另请参见:
ControllerListener
,
Controller.addControllerListener(ControllerListener)
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ControllerAdapter
public ControllerAdapter()
cachingControl
public void cachingControl(CachingControlEvent e)
controllerError
public void controllerError(ControllerErrorEvent e)
dataLostError
public void dataLostError(DataLostErrorEvent e)
dataStarved
public void dataStarved(DataStarvedEvent e)
internalError
public void internalError(InternalErrorEvent e)
resourceUnavailable
public void resourceUnavailable(ResourceUnavailableEvent e)
durationUpdate
public void durationUpdate(DurationUpdateEvent e)
mediaTimeSet
public void mediaTimeSet(MediaTimeSetEvent e)
rateChange
public void rateChange(RateChangeEvent e)
stopTimeChange
public void stopTimeChange(StopTimeChangeEvent e)
transition
public void transition(TransitionEvent e)
prefetchComplete
public void prefetchComplete(PrefetchCompleteEvent e)
realizeComplete
public void realizeComplete(RealizeCompleteEvent e)
start
public void start(StartEvent e)
stop
public void stop(StopEvent e)
deallocate
public void deallocate(DeallocateEvent e)
endOfMedia
public void endOfMedia(EndOfMediaEvent e)
restarting
public void restarting(RestartingEvent e)
stopAtTime
public void stopAtTime(StopAtTimeEvent e)
stopByRequest
public void stopByRequest(StopByRequestEvent e)
audioDeviceUnavailable
public void audioDeviceUnavailable(AudioDeviceUnavailableEvent e)
configureComplete
public void configureComplete(ConfigureCompleteEvent e)
controllerClosed
public void controllerClosed(ControllerClosedEvent e)
sizeChange
public void sizeChange(SizeChangeEvent e)
connectionError
public void connectionError(ConnectionErrorEvent e)
formatChange
public void formatChange(javax.media.format.FormatChangeEvent e)
replaceURL
public void replaceURL(java.lang.Object e)
showDocument
public void showDocument(java.lang.Object e)
controllerUpdate
public void controllerUpdate(ControllerEvent e)
- Main dispatching function. Subclasses should not need to
override this method, but instead subclass only the individual
event methods listed above that they need
- 指定者:
- 接口
ControllerListener
中的 controllerUpdate
- 参数:
e
- The event generated.