javax.media
Class ControllerAdapter
java.lang.Object
|
+--javax.media.ControllerAdapter
- 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();
}
});
- See Also:
ControllerListener
,
Controller.addControllerListener(ControllerListener)
Methods inherited from class 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(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
- Specified by:
- controllerUpdate in interface ControllerListener
- Tags copied from interface: ControllerListener
- Parameters:
event
- The event generated.
Submit a bug or feature
Copyright 1999-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the Specification License for more details.
Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.