quicktime.app.ui
Class UIElement

java.lang.Object
  |
  +--quicktime.app.anim.TwoDSprite
        |
        +--quicktime.app.ui.UIElement
All Implemented Interfaces:
Compositable, DynamicImage, ImageSettable, ImageSpec, Layerable, NotifyListener, Transformable
Direct Known Subclasses:
QTButton

Deprecated. since QTJava 6.1

public class UIElement
extends TwoDSprite
implements DynamicImage

This class handles all the tasks of updating and redrawing the TwoDSprite. It takes care of redrawing the Dynamic images that are in the sprite. This class also sets the size and location of the TwoDSprite.


Field Summary
protected  ImageSpec currentImage
          Deprecated. The image used when the UIElement is active* @deprecated since QTJava 6.1
protected  ImageSpec deactiveImage
          Deprecated. The image used when the UIElement is deactive* @deprecated since QTJava 6.1
 
Fields inherited from class quicktime.app.anim.TwoDSprite
label
 
Fields inherited from interface quicktime.app.display.Layerable
kBackMostLayer
 
Constructor Summary
protected UIElement(ImageSpec currentImage, ImageSpec deactiveImage, Matrix matrix, int layer, GraphicsMode mode)
          Deprecated. since QTJava 6.1
 
Method Summary
 Invalidator addedToCompositor(SWCompositor c, TwoDSprite s)
          Deprecated. Returns an object that invalidates a sprite.
 QDRect getBounds()
          Deprecated. since QTJava 6.1
 boolean isActive()
          Deprecated. since QTJava 6.1
 void removedFromCompositor(SWCompositor c)
          Deprecated. When a dynamic image class is removed from a SWCompositor this method is called to allow the class to cleanup any of the invalidation processes it had established in the addedToCompositor call.
 void setActive(boolean active)
          Deprecated. since QTJava 6.1
protected  void setCurrentImage(ImageSpec newCurrentImage)
          Deprecated. since QTJava 6.1
 void setLocation(int tx, int ty)
          Deprecated. since QTJava 6.1
 void setSize(QDDimension size)
          Deprecated. since QTJava 6.1
 
Methods inherited from class quicktime.app.anim.TwoDSprite
createSprite, equals, getDescription, getGraphicsMode, getImage, getInitialSize, getLabel, getLayer, getMatrix, getOriginalSize, getParent, getSpriteInfo, getVisible, hitTest, invalidate, isValid, notifyComplete, remove, removeNotify, setDescription, setGraphicsMode, setImage, setImageData, setLabel, setLayer, setMatrix, setNotifier, setVisible, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface quicktime.app.image.Compositable
getGraphicsMode, setGraphicsMode
 
Methods inherited from interface quicktime.app.image.ImageSpec
getDescription, getImage
 

Field Detail

deactiveImage

protected ImageSpec deactiveImage
Deprecated. 
The image used when the UIElement is deactive* @deprecated since QTJava 6.1


currentImage

protected ImageSpec currentImage
Deprecated. 
The image used when the UIElement is active* @deprecated since QTJava 6.1

Constructor Detail

UIElement

protected UIElement(ImageSpec currentImage,
                    ImageSpec deactiveImage,
                    Matrix matrix,
                    int layer,
                    GraphicsMode mode)
             throws QTException
Deprecated. since QTJava 6.1

Constructs a UIElement sprite.

Parameters:
currentImage - this will be the currentImage that is presented by the UIElement. It may NOT be null
deactiveImage - this is the image that will be used if the UIElement is deactiveated. It may be null
matrix - describes the location and display characteristics of the UIElement
layer - the back to front layer of the UIElement when added to the Compositor
mode - if specified, a GraphicsMode that is used to render the UIElement
Method Detail

setLocation

public void setLocation(int tx,
                        int ty)
                 throws QTException
Deprecated. since QTJava 6.1

sets the x and y coordinates of the UIElement.

Parameters:
tx - the x coordinate
ty - the y coordinate
QTException

setSize

public void setSize(QDDimension size)
             throws QTException
Deprecated. since QTJava 6.1

sets the size of the UIElement

Parameters:
size - the Dimension size in pixel values
QTException

getBounds

public QDRect getBounds()
                 throws QTException
Deprecated. since QTJava 6.1

Returns:
the location and the size of the UIElement.
QTException

setCurrentImage

protected void setCurrentImage(ImageSpec newCurrentImage)
                        throws QTException
Deprecated. since QTJava 6.1

Sets the current image of the UIElement.

Parameters:
newCurrentImage - the current image thats set to be displayed by the TwoDSprite. If null the UIElement is deactivated.
QTException

setActive

public void setActive(boolean active)
               throws QTException
Deprecated. since QTJava 6.1

Sets the current state of the UIElement , it wont receive any events when set to false

Parameters:
active - true will set the state to active
QTException

isActive

public boolean isActive()
Deprecated. since QTJava 6.1

Returns the current state of the UIElement

Returns:
true if actives

addedToCompositor

public Invalidator addedToCompositor(SWCompositor c,
                                     TwoDSprite s)
                              throws QTException
Deprecated. since QTJava 6.1

Description copied from interface: DynamicImage
Returns an object that invalidates a sprite. When a DynamicImage is a member of a SWompositor and the DynamicImage presents a changing image (for example a movie), the TwoDSprite that presents that image in the SWCompositor must be invalidated so that it will redraw the Sprites image in the next composit cycle. The Invalidator object is used to perform this function by the SWCompositor if the object itself cannot perform the invalidation. Can return null if the DynamicImage does not require the SWCompositor to invalidate it (or the object is in a state where its image won't change).

The Invalidators provided with objects that implement the DynamicImage interface will execute at the scale and period of the Compositor when they are created.

Specified by:
addedToCompositor in interface DynamicImage
Parameters:
c - the Compositor in which the DynamicImage is a member
s - the TwoDSprite that is presenting the DynamicImage's image in the Compositor. This is the sprite that must be invalidated.
Returns:
an Invalidator or null if invalidation is not required
QTException
See Also:
SWCompositor

removedFromCompositor

public void removedFromCompositor(SWCompositor c)
                           throws QTException
Deprecated. since QTJava 6.1

Description copied from interface: DynamicImage
When a dynamic image class is removed from a SWCompositor this method is called to allow the class to cleanup any of the invalidation processes it had established in the addedToCompositor call.

Specified by:
removedFromCompositor in interface DynamicImage
Parameters:
c - the SWCompositor it is being removed from
QTException
See Also:
SWCompositor