Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.app.display
Class QTCanvas

    java.lang.Object
      |
      +--java.awt.Component
            |
            +--java.awt.Canvas
                  |
                  +--quicktime.app.display.QTCanvas

All Implemented Interfaces:
  javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class QTCanvas
extends java.awt.Canvas

A specialized canvas which supplies access to the native graphics environment and offers expanded functionality to control its viewing or display size. The QTCanvas object can display any object which implements the Drawable interface. This Drawable object is set as the drawing client of the QTCanvas object.

The resize and alignment flags determine how the QTCanvas object acts when it has its setSize or setBounds method called. These flags allow the application to control or restrict the viewing size of a QTCanvas - generally desirable as the QuickTime client of a QTCanvas is constructed to be viewed in a particular best size or react in a desired manner when resized. The resize flags comments discuss the typically appropriate usage. If the kAnySize flag is used the QTCanvas will be resized as any other java.awt.Component.

The size of the QTCanvas and its Drawable client are kept synchronized. The actual size of the QTCanvas is determined by the size of its Drawable client when it is set (which becomes its "best" viewing size), the resize and alignement flag settings, and the size of the QTCanvas' java.awt.Container parent. The client, the resize and alignment flags determine how a QTCanvas reacts to a setBounds or setSize call - any resize flag other than the kAnySize flag will result in the QTCanvas' actual size being arbitrated with the best viewing size of its client. Thus in many cases the calls to setSize and setBounds on a QTCanvas object are requests and may not result in the QTCanvas actually being resized to that requested size.

When a QTCanvas' client is set the size of the client's current size is used by the QTCanvas to indicate that this is that client's best viewing size. By default (and an application can change this) this will also become the preferred size of the QTCanvas. This size is cached by the QTCanvas and used when it is responding to resize requests from its parent Container (for instance, the user resizes the window the QTCanvas is in).

If an application changes the size of the client after it has been set - for instance a Movie client is edited and the viewing area of the movie is now different - then the application must inform the QTCanvas that the client's best size is changed, before resizing the QTCanvas itself. This ensures that the QTCanvas will resize and redraw the client correctly, avoiding unwanted scaling of the client:

    	// application changes the actual display size of a Movie through
    	// adding a video track to a movie that only had a sound track
    	// this means that the movie client has now a best size that
    	// that is different when it was originally set as the client of this QTCanvas
    	myQTCanvas.clientChanged (r.getWidth(), r.getHeight());
    	myQTCanvas.invalidate();

     	//resize the QTCanvas' parent container so that the changed viewing conditions of the
    	//client will be seen.
    	//pack() is appropriate, as is getParent().setSize(), or getParent().setBounds()
    	//The application could also just validate the parent if the parent should not change size

Once the application has notified the canvas that the client's best viewing size has changed the QTCanvas will correctly respond to the any new sizes that are given to it by it parent's layout manager or resizing actions.

In most interactions between a QTCanvas and its client this explicit resizing of the client is not required as all of the Drawable clients are able to scale themselves appropriately to a different display size. It is only required when the client's size itself has changed.

See Also:
  `Drawable`, Serialized Form

Inner classes inherited from class java.awt.Canvas
`java.awt.Canvas.AccessibleAWTCanvas`

Inner classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent`

Field Summary
`static int` | `kAspectResize` Use this flag if the client can be resized to any size which preserves the initial aspect ratio.
`static int` | `kFreeResize` Use this flag if the client can be resized to any size >= the minimum and <= the maximum.
`static int` | `kHorizontalResize` Use this flag to allow the client's horizontal aspect to be any size, but the vertical axis will be the intial size of smaller.
`static int` | `kInitialSize` Use this flag if the client should revert to its initially specified size.
`static int` | `kInitialSizeNoResize` Use this flag specify that the client cannot be resized
`static int` | `kIntegralResize` Use this flag if the client should maintain the aspect size of its original dimensions but grow bigger by integral increments (2x, 3x, 4x, etc.)
`static int` | `kPerformanceResize` Use this flag if the client can be resized to any size which is a factor of 2 of the initial size.
`static int` | `kVerticalResize` Use this flag to allow the client's vertical aspect to be any size, but the horizontal axis will be the intial size of smaller.

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`QTCanvas()` Constructor for creating a client-less QTCanvas.
`QTCanvas(int resizeFlag, float xAlignment, float yAlignment)` Constructor for creating a client-less QTCanvas.

Method Summary
`void` | `addNotify()` We use this method to notify an existing client that its NativeGraphics environment may have changed and it should recheck its status
`void` | `addQTClientListener(java.awt.event.ComponentListener e)` A ComponentListener and ComponentEvent are used to listen to these types of events that occur to the QTCanvas' client - ie.
`void` | `clientChanged(java.awt.Dimension bestSize)` This method is used by an appliction to notify a QTCanvas that the best size of its' current client has changed.
`void` | `clientChanged(int bestWidth, int bestHeight)` This method is used by an appliction to notify a QTCanvas that the best size of its' current client has changed.
`protected void` | `finalize()`
`float` | `getAlignmentX()` Returns the current setting of the x position alignment being used.
`float` | `getAlignmentY()` Returns the current setting of the y position alignment being used.
`java.awt.Dimension` | `getBestSize()` Returns the best size of the client, the size of the client when it was set to this QTCanvas, or the size if the appliction notified the QTCanvas that the clien't best size was changed.
`Drawable` | `getClient()` Returns the Drawable object currently associated with this QTCanvas.
`java.awt.Dimension` | `getMaximumSize()` Returns the maximum acceptable size of this QTCanvas object.
`java.awt.Dimension` | `getMinimumSize()` Returns the minimum acceptable size of this QTCanvas object.
`NativeGraphics` | `getNativeGraphics()` Returns the NativeGrapics object that represents the Graphics Port that corresponds to the display space taken up by the QTCanvas.
`java.awt.Point` | `getNGLocation()` Returns the coordinates of a component relative to the NativeGrapics window it is currently placed within.
`QDGraphics` | `getPort()` This method will return a QTJava object, QDGraphics, which is a reference to the native graphics drawing environment being used by this QTCanvas object.
`java.awt.Dimension` | `getPreferredSize()` Returns the preferred size of the QTCanvas object.
`int` | `getResizeFlag()` Returns the current setting of the resize flag being used.
`void` | `paint(java.awt.Graphics g)` Override the standard paint method.
`void` | `removeClient()` Removes the client from the canvas.
`void` | `removeNotify()` Overridden to notify the client associated with this QTCanvas that it no longer has a grafport to draw to and should stop all graphics operations.
`void` | `removeQTClientListener(java.awt.event.ComponentListener e)` Remove a previously registered ComponentListener that is listening to events that occur with the QTCanvas' QTDrawable client.
`void` | `reshape(int x, int y, int width, int height)` Deprecated. As of JDK version 1.1, replaced by `setBounds(int, int, int, int)`.
`void` | `setAlignment(float xAlignment, float yAlignment)` Set the alignment position values.
`void` | `setAlignmentX(float x)`
`void` | `setAlignmentY(float y)`
`void` | `setBounds(int x, int y, int width, int height)` Resizes and/or moves the QTCanvas object as well as the associated Drawable object to the parameters specified.
`void` | `setClient(Drawable client, boolean layoutFlag)` Associates a new client, a Drawable object, with this QTCanvas.
`void` | `setClient(Drawable client, QDRect initialBounds)` Associates a new client, a Drawable object, with this QTCanvas.
`void` | `setMaximumSize(java.awt.Dimension maxSize)` Set the minimum size of the QTCanvas.
`void` | `setMaximumSize(int width, int height)` Set the maximum size of the canvas.
`void` | `setMinimumSize(java.awt.Dimension minSize)` Set the minimum size of the QTCanvas.
`void` | `setMinimumSize(int width, int height)` Set the minimum size of the canvas.
`void` | `setPreferredSize(java.awt.Dimension prefSize)` Sets the preferred size of the QTCanvas object.
`void` | `setPreferredSize(int width, int height)` Sets the preferred size of the QTCanvas object.
`void` | `setResizeFlag(int rFlag)` Reset the resize flag and re-layout the component.
`void` | `setSize(java.awt.Dimension dim)` Resizes the QTCanvas object to the specified parameters.
`void` | `setSize(int width, int height)` Resizes the QTCanvas object, as well as the associated Drawable object.
`void` | `setVisible(boolean b)` Sets the visible state of the Canvas.
`java.lang.String` | `toString()` Print information about this object.
`QDPoint` | `translatePoint(int x, int y)` An incoming point (typically from some kind of MouseEvent) is in coordinates that have their origin set at the local coordinate system of the canvas.
`void` | `update(java.awt.Graphics g)` We override the update method to call our paint method as the background colour repaint is not valid for a QTCanvas object.

Methods inherited from class java.awt.Canvas
`getAccessibleContext`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, show, show, size, transferFocus, validate`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### kIntegralResize

    public static final int kIntegralResize

  Use this flag if the client should maintain the aspect size of its original dimensions but grow bigger by integral increments (2x, 3x, 4x, etc.)

### kInitialSize

    public static final int kInitialSize

  Use this flag if the client should revert to its initially specified size. The client can be made smaller (using an aspect setting) but can be no larger than its initial size. The QTCanvas takes this initial size as the best viewing size for its client.

### kFreeResize

    public static final int kFreeResize

  Use this flag if the client can be resized to any size >= the minimum and <= the maximum.

### kAspectResize

    public static final int kAspectResize

  Use this flag if the client can be resized to any size which preserves the initial aspect ratio.

### kPerformanceResize

    public static final int kPerformanceResize

  Use this flag if the client can be resized to any size which is a factor of 2 of the initial size.

### kHorizontalResize

    public static final int kHorizontalResize

  Use this flag to allow the client's horizontal aspect to be any size, but the vertical axis will be the intial size of smaller. This is a good setting for QT VR content.

### kVerticalResize

    public static final int kVerticalResize

  Use this flag to allow the client's vertical aspect to be any size, but the horizontal axis will be the intial size of smaller.

### kInitialSizeNoResize

    public static final int kInitialSizeNoResize

  Use this flag specify that the client cannot be resized

Constructor Detail

### QTCanvas

    public QTCanvas()

  Constructor for creating a client-less QTCanvas. Default settings are:
  Resize Flag is kFreeResize
  xAlignment and yAlignment are both set to 0 (top left)
  Minimum size is (1, 1)
  Maximum size is (Integer.MAX_VALUE, Integer.MAX_VALUE)

### QTCanvas

    public QTCanvas(int resizeFlag,
                    float xAlignment,
                    float yAlignment)

  Constructor for creating a client-less QTCanvas.
  Parameters:
    `resizeFlag` - the resize control setting
    `xAlignment` - a value between 0 and 1 that sets the position of the drawable client within the space that AWT will give to the canvas when layed out. 0 means left, 1 means right, 0.5 means centre.
    `yAlignment` - a value between 0 and 1 that sets the position of the drawable client within the space that AWT will give to the canvas when layed out. 0 means top, 1 means bottom, 0.5 means centre.

Method Detail

### getPort

    public final QDGraphics getPort()
                             throws QTUnknownOSException,
                                    NativeGraphicsException

  This method will return a QTJava object, QDGraphics, which is a reference to the native graphics drawing environment being used by this QTCanvas object. If the canvas is invisible it will return an offscreen QDGraphics that will never be seen.
  Returns:
    a QDGraphics object
  Throws:
    `QTUnknownOSException` - if the current operating system is unknown to QuickTime
    `quicktime.NativeGraphicsException` - if there was a problem initialising the NativeGraphics environment

### getNGLocation

    public final java.awt.Point getNGLocation()
                                       throws QTUnknownOSException,
                                              NativeGraphicsException

  Returns the coordinates of a component relative to the NativeGrapics window it is currently placed within.
  Returns:
    a Point object representing the location of the QTCanvas in the native graphics environment

### getNativeGraphics

    public final NativeGraphics getNativeGraphics()

  Returns the NativeGrapics object that represents the Graphics Port that corresponds to the display space taken up by the QTCanvas. It may return null if there is currently no native graphics environment
  Returns:
    a NativeGraphics object.

### translatePoint

    public final QDPoint translatePoint(int x,
                                        int y)
                                 throws QTUnknownOSException,
                                        NativeGraphicsException

  An incoming point (typically from some kind of MouseEvent) is in coordinates that have their origin set at the local coordinate system of the canvas. This method converts those coordinates into the native graphics location that is the coordinate system of the canvas' client.
  Parameters:
    `x` - the x location
    `y` - the y location
  Returns:
    a QDPoint that translates the x and y into the NativeGraphics coordinate system.

### removeClient

    public final void removeClient()

  Removes the client from the canvas.

### setClient

    public void setClient(Drawable client,
                          boolean layoutFlag)
                   throws QTException

  Associates a new client, a Drawable object, with this QTCanvas. The flag determines if awt will perform a layout and how the client will be integrated with the canvas. If the flag is false then the new client will take on the current size and position of the canvas. If the flag is true, then awt will layout the canvas again, using the initial size of the client and the resize flags to resize the canvas and its client.

  The size of the client when this method is called is used to ascertain the best size for viewing this client's media.

  This method can throw a number of exceptions:
  QTUnknownOSException the application is trying to run on a platform that is not supported by QuickTime
  NativeGraphicsException the native graphics environment is not initialised
  QTException or subclass - there was a problem within QuickTime itself in dealing with this client

  Parameters:
    `client` - a Drawable object - if null the method will remove the client
    `layoutFlag` - if true java.awt will re-layout the canvas, if false the client will fit into the existing state (display size, etc) of the canvas, disregarding any resize that might have occured to honour the layout flag setting with respect to the different size of the new client.

### setClient

    public void setClient(Drawable client,
                          QDRect initialBounds)
                   throws QTException

  Associates a new client, a Drawable object, with this QTCanvas. It will use existing alignment and resize restrictions.

  This method can throw a number of exceptions:
  QTUnknownOSException the application is trying to run on a platform that is not supported by QuickTime
  NativeGraphicsException the native graphics environment is not initialised
  QTException or subclass - there was a problem within QuickTime itself in dealing with this client

  Parameters:
    `client` - a Drawable object - if null the method will remove the client
    `initialBounds` - the best size of the client

### getClient

    public final Drawable getClient()

  Returns the Drawable object currently associated with this QTCanvas.
  Returns:
    a Drawable object

### setAlignment

    public void setAlignment(float xAlignment,
                             float yAlignment)

  Set the alignment position values. The alignment values must be between 0.0 and 1.0. Values out of this range will be reset to either 0.0 or 1.0, whichever is closest to the given argument.

  Alignment Positioning works like this:

  x=0.0 y=0.0
    is equivalent to a top-left position
  x=1.0 y=1.0
    is equivalent to a bottom-right position
  x=0.5 y=0.5
    is equivalent to a centered position
  x=0.25 y=0.75
    is equivalent to 1/4 in from the the left and 3/4 down from the top
  Position alignments can be varied to any degree, limited by the pixel resolution of the display surface.
  Parameters:
    `xAlignment` - a float between 0.0 and 1.0 representing the x position alignment
    `yAlignment` - a float between 0.0 and 1.0 representing the y position alignment

### setAlignmentX

    public final void setAlignmentX(float x)

  See Also:
    `setAlignment`

### setAlignmentY

    public final void setAlignmentY(float y)

  See Also:
    `setAlignment`

### getAlignmentX

    public float getAlignmentX()

  Returns the current setting of the x position alignment being used.
  Overrides:
    `getAlignmentX` in class `java.awt.Component`

### getAlignmentY

    public float getAlignmentY()

  Returns the current setting of the y position alignment being used.
  Overrides:
    `getAlignmentY` in class `java.awt.Component`

### setResizeFlag

    public void setResizeFlag(int rFlag)

  Reset the resize flag and re-layout the component.
  Parameters:
    `rFlag` - the new value for the resizeFlag

### getResizeFlag

    public int getResizeFlag()

  Returns the current setting of the resize flag being used.
  Returns:
    the resize flag value

### setMinimumSize

    public void setMinimumSize(java.awt.Dimension minSize)

  Set the minimum size of the QTCanvas. If the QTCanvas is currently smaller than the minimum size passed in, it will be adjusted to meet the new minimum size requirements, in accordance with the setting of the resizeFlag.
  Parameters:
    `minSize` - a Dimension object

### setMinimumSize

    public void setMinimumSize(int width,
                               int height)

  Set the minimum size of the canvas.
  Parameters:
    `width` - the minimum width
    `height` - the minimum height

### getMinimumSize

    public java.awt.Dimension getMinimumSize()

  Returns the minimum acceptable size of this QTCanvas object.
  Overrides:
    `getMinimumSize` in class `java.awt.Component`
  Returns:
    a Dimension object which defines the minimum size

### getBestSize

    public java.awt.Dimension getBestSize()

  Returns the best size of the client, the size of the client when it was set to this QTCanvas, or the size if the appliction notified the QTCanvas that the clien't best size was changed. This may not be the size of the display space of the QTCanvas depending on java layout instructions and current display space available to the canvas.
  Returns:
    a Dimension object which details the client's known initial size
  See Also:
    `clientChanged`

### clientChanged

    public void clientChanged(java.awt.Dimension bestSize)

  This method is used by an appliction to notify a QTCanvas that the best size of its' current client has changed. This is typically the initial or actual size of the client before any matrix transforamations have been applied to the client.

  An application only needs to call this if the display characteristics of the client have been changed. For instance, the client is a movie and some of the visual tracks of this movie have been disabled, or a new video track was added. Thus the movie itself has changed its best size and the application must use this method to notify the QTCanvas that the client's best size has changed.

  This will not effect the display area of the QTCanvas, the application should invalidate the QTCanvas and re-layout the parent container to have this change take effect. getBestSize() returns this newly notified size.

  In the normal operation of a QTCanvas and its client there is no need for an application to use this method.

  Parameters:
    `bestSize` - the client's new best width and height

### clientChanged

    public void clientChanged(int bestWidth,
                              int bestHeight)

  This method is used by an appliction to notify a QTCanvas that the best size of its' current client has changed. This is typically the initial or actual size of the client before any matrix transforamations have been applied to the client.

  An application only needs to call this if the display characteristics of the client have been changed. For instance, the client is a movie and some of the visual tracks of this movie have been disabled, or a new video track was added. Thus the movie itself has changed its best size and the application must use this method to notify the QTCanvas that the client's best size has changed.

  This will not effect the display area of the QTCanvas, the application should invalidate the QTCanvas and re-layout the parent container to have this change take effect. getBestSize() returns this newly notified size.

  In the normal operation of a QTCanvas and its client there is no need for an application to use this method.

  Parameters:
    `bestWidth` - the client's new best width
    `bestHeight` - the client's new actual height

### getPreferredSize

    public java.awt.Dimension getPreferredSize()

  Returns the preferred size of the QTCanvas object. If you haven't explicitly set the preferred size of the canvas this will be the initial size of the canvas' client.
  Overrides:
    `getPreferredSize` in class `java.awt.Component`
  Returns:
    a Dimension object which defines the preferred size

### setPreferredSize

    public void setPreferredSize(java.awt.Dimension prefSize)

  Sets the preferred size of the QTCanvas object.
  Returns:
    a Dimension object which defines the preferred size

### setPreferredSize

    public void setPreferredSize(int width,
                                 int height)

  Sets the preferred size of the QTCanvas object. Passing in values of less than zero for width and height will reset the behaviour of the QTCanvas to retrieve the preferred size as the initial size of the current or new client of the QTCanvas.
  Parameters:
    `width` - the minimum width
    `height` - the minimum height

### setMaximumSize

    public void setMaximumSize(java.awt.Dimension maxSize)

  Set the minimum size of the QTCanvas. If the QTCanvas is currently larger than the maximum size passed in, it will be adjusted to meet the new maximum size requirements, in accordance with the setting of the resizeFlag. If null is passed in, maximum size will be the size of the screen
  Parameters:
    `maxSize` - a Dimension object

### setMaximumSize

    public void setMaximumSize(int width,
                               int height)

  Set the maximum size of the canvas.
  Parameters:
    `width` - the minimum width
    `height` - the minimum height

### getMaximumSize

    public java.awt.Dimension getMaximumSize()

  Returns the maximum acceptable size of this QTCanvas object.
  Overrides:
    `getMaximumSize` in class `java.awt.Component`
  Returns:
    a Dimension object which defines the maximum size

### setSize

    public void setSize(java.awt.Dimension dim)

  Resizes the QTCanvas object to the specified parameters.
  Overrides:
    `setSize` in class `java.awt.Component`
  Parameters:
    `dim` - a Dimension object with the new width and height

### setSize

    public void setSize(int width,
                        int height)

  Resizes the QTCanvas object, as well as the associated Drawable object.
  Overrides:
    `setSize` in class `java.awt.Component`
  Parameters:
    `width` - the width, in pixels, to make this component
    `height` - the height, in pixels, to make this component

### reshape

    public final void reshape(int x,
                              int y,
                              int width,
                              int height)

  Deprecated. As of JDK version 1.1, replaced by `setBounds(int, int, int, int)`.

  Overrides:
    `reshape` in class `java.awt.Component`

### setBounds

    public final void setBounds(int x,
                                int y,
                                int width,
                                int height)

  Resizes and/or moves the QTCanvas object as well as the associated Drawable object to the parameters specified.
  Overrides:
    `setBounds` in class `java.awt.Component`
  Parameters:
    `x` - the x coordinate, in pixels, relative to the parent of this component
    `y` - the y coordinate, in pixels, relative to the parent of this component
    `width` - the width, in pixels, to make this component
    `height` - the height, in pixels, to make this component

### paint

    public void paint(java.awt.Graphics g)

  Override the standard paint method.
  Overrides:
    `paint` in class `java.awt.Canvas`

### update

    public void update(java.awt.Graphics g)

  We override the update method to call our paint method as the background colour repaint is not valid for a QTCanvas object. However, subclasses can override the update method to do whatever is appropriate for their particular situation.
  Overrides:
    `update` in class `java.awt.Component`

### setVisible

    public void setVisible(boolean b)

  Sets the visible state of the Canvas.
  Overrides:
    `setVisible` in class `java.awt.Component`
  Parameters:
    `b` - if true canvas is visible, if false then its not

### addQTClientListener

    public void addQTClientListener(java.awt.event.ComponentListener e)

  A ComponentListener and ComponentEvent are used to listen to these types of events that occur to the QTCanvas' client - ie. when the QTCanvas' client is resized, moved, shown or hidden. These events generally occur in conjunction with the Component events they mirror - with some exceptions:
  - ComponentShown and ComponentHidden are generated when the QTCanvas is shown or hidden and when the QTDrawable client is set or removed.
  - ComonentMoved and ComponentResized are generated when the QTCanvas is moved or resized but the event is actually generated when the QTCanvas is repainted as this is when the QTDrawable client is itself resized or moved.
  Parameters:
    `e` - the ComponentListener

### removeQTClientListener

    public void removeQTClientListener(java.awt.event.ComponentListener e)

  Remove a previously registered ComponentListener that is listening to events that occur with the QTCanvas' QTDrawable client.
  Parameters:
    `e` - the ComponentListener
  See Also:
    `addQTClientListener`

### addNotify

    public void addNotify()

  We use this method to notify an existing client that its NativeGraphics environment may have changed and it should recheck its status
  Overrides:
    `addNotify` in class `java.awt.Canvas`

### removeNotify

    public void removeNotify()

  Overridden to notify the client associated with this QTCanvas that it no longer has a grafport to draw to and should stop all graphics operations.
  Overrides:
    `removeNotify` in class `java.awt.Component`

### toString

    public java.lang.String toString()

  Print information about this object.
  Overrides:
    `toString` in class `java.awt.Component`
  Returns:
    a string representing this QTCanvas object

### finalize

    protected void finalize()
                     throws java.lang.Throwable

  Overrides:
    `finalize` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD