All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface quicktime.app.display.QTDrawable

public interface QTDrawable
extends Drawable, Transformable
This interface is designed to work hand-in-hand with a QTCanvas object. Therefore, all classes which want to interact with a QTCanvas object, referred to as 'clients' must implement this interface.

The class that implements this interface must draw into the QDGraphics that is presented to the client - therefore this is not an appropriate interface for objects that are not QuickTime based drawing objects.

Note: A Java applet or application never directly calls any of these Drawable methods -- the QTCanvas object associated with this Drawable object will call these methods as needed.

QTExceptions can be thrown by any of these methods and would indicate that either the graphics environment has changed in some unexpected way or that the media object itself is in some unexpected state.


Method Index

 o getClip()
This method allows you to get the current clipped Region of the Transformable.
 o getGWorld()
QTCanvas calls this method to get the destination QDGraphics of its client.
 o setClip(Region)
This method allows you to set a Transformable's clipping region.
 o setGWorld(QDGraphics)
QTCanvas calls this method to give the client the QDGraphics object it should use to do its drawing.
 o setLocation(int, int)
A convenience method to set the position of a QTDrawable object.

Methods

 o setLocation
 public abstract void setLocation(int x,
                                  int y) throws QTException
A convenience method to set the position of a QTDrawable object.

Parameters:
x - the new x location
y - the new y location
 o setGWorld
 public abstract void setGWorld(QDGraphics cgp) throws QTException
QTCanvas calls this method to give the client the QDGraphics object it should use to do its drawing. If the incoming QDGraphics is the QDGraphics.scratch then the drawable will not be visible and can disable itself. If a client is unable to set the graphics world it should throw an exception.

Parameters:
cgp - a QDGraphics object
 o getGWorld
 public abstract QDGraphics getGWorld() throws QTException
QTCanvas calls this method to get the destination QDGraphics of its client.

Returns:
a QDGraphics object or null
 o setClip
 public abstract void setClip(Region theClip) throws QTException
This method allows you to set a Transformable's clipping region.

Parameters:
theClip - a Region that defines the new clipping region.
 o getClip
 public abstract Region getClip() throws QTException
This method allows you to get the current clipped Region of the Transformable.

Returns:
the clipping region

All Packages  Class Hierarchy  This Package  Previous  Next  Index