Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |

Deprecation of AWT Dependencies

All usage of java.awt classes outside of QTCanvas, QTImageDrawer, QTImageProducer, FullScreenWindow has been deprecated.

The reasons for this deprecation are various. It was decided to factor out QuickTime for Java's dependencies on AWT to those classes that interact directly with it and to create an abstraction layer between the core QuickTime for Java classes and any environmental requirements.

It is still possible to keep the AWT-dependent methods in those classes which have used them in the past, but still have those classes load and do their work if AWT classes are not present in the runtime system. These include constructors for QDRect, QDColor, QDPoint, Track.getDimensions, FullScreen methods, and getInitialSize() in a variety of classes in the app packages.

A QDDimension class has been provided which is used in those situations instead and you are strongly encouraged to support usage of this class. The changed API calls should be used instead of these deprecated methods.

The existing usage of java.awt.Dimension still remains, and will be supported. This is a deprecation, not a removal: if any problems arise, they should be reported to Apple.

Changes to the QTPlayer are also in effect. QTPlayer no longer implements java.awt.event listeners -- it delegates handling of events to a QTPlayerEventHandler object. This object will construct an event handler based on selection criteria defined by a QTPlayerEventHandlerMaker class which an application can register. If there are no custom event handlers for the given QTPlayer instance and the source object (for instance, a java.awt.Component), then the system will use its default event handlers, i.e., QTPlayerAWTEventHandler. This event handler can be subclassed by applications to do any custom AWT event handling if this is desirable, and then the application should register this event handler. The event handler that is made can be controlled also by the application.


© 2000 Apple Computer, Inc.

Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |