quicktime.app.display
Interface Drawable

All Superinterfaces:
Listener
All Known Subinterfaces:
QTDisplaySpace, QTDrawable
All Known Implementing Classes:
ImageDrawer

public interface Drawable
extends Listener

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.

This interface is general enough that Java drawing objects can implement this interface and therefore become a client of the QTCanvas.

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 Summary
 QDRect getDisplayBounds()
          QTCanvas calls this method when it needs to ask the client for its boundary.
 void redraw(Region invalidRgn)
          QTCanvas calls this method when the client should redraw itself.
 void setDisplayBounds(QDRect bounds)
          QTCanvas calls this method when it needs to tell the client to adjust its location, width and/or height.
 
Methods inherited from interface quicktime.app.spaces.Listener
addedTo, removedFrom
 

Method Detail

setDisplayBounds

public void setDisplayBounds(QDRect bounds)
                      throws QTException
QTCanvas calls this method when it needs to tell the client to adjust its location, width and/or height. All values are in pixels.
Parameters:
bounds - the new size and location.

getDisplayBounds

public QDRect getDisplayBounds()
                        throws QTException
QTCanvas calls this method when it needs to ask the client for its boundary. All values are in pixels.
Returns:
the display boundary of the client

redraw

public void redraw(Region invalidRgn)
            throws QTException
QTCanvas calls this method when the client should redraw itself. If the canvas is able to discern that only a part of the client's drawing area needs to be redrawn - then this area shall be passed in using the invalidRgn. Otherwise this will be null in which case the client should redraw itself entirely.
Parameters:
invalidRgn - the invalidRgn that the client should redraw