quicktime.app.ui
Class QTButton

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

Deprecated. since QTJava 6.1

public abstract class QTButton
extends UIElement

This abstarct class provides the basic functionality for a QTButton which takes care of the event handling of the button. It also updates the button images and sets the current image of the button as the mouse enters and leaves the button. Other classes can extend this class to provide their own button behaviour. The QTButton will fire action events as defined by these subclasses. The label of the TwoDSprite will be passed on to the action listeners.


Field Summary
protected  QTActionListener actionListener
          Deprecated. The QTActionListeners that will be fired when the QTButton is activated.* @deprecated since QTJava 6.1
protected  ImageSpec pressedImage
          Deprecated. The image presented by the QTButton when it is in a pressed state.* @deprecated since QTJava 6.1
protected  ImageSpec releasedImage
          Deprecated. since QTJava 6.1
protected  ImageSpec rolloverImage
          Deprecated. If specified then the image presented by the QTButton when it is in a released state and the mouse is over the button.* @deprecated since QTJava 6.1
 
Fields inherited from class quicktime.app.ui.UIElement
currentImage, deactiveImage
 
Fields inherited from class quicktime.app.anim.TwoDSprite
label
 
Fields inherited from interface quicktime.app.display.Layerable
kBackMostLayer
 
Constructor Summary
protected QTButton(ImageSpec releasedImage, ImageSpec pressedImage, ImageSpec deactiveImage, ImageSpec rolloverImage)
          Deprecated. since QTJava 6.1
protected QTButton(ImageSpec releasedImage, ImageSpec pressedImage, ImageSpec deactiveImage, ImageSpec rolloverImage, Matrix matrix, int layer, GraphicsMode mode)
          Deprecated. since QTJava 6.1
 
Method Summary
 void addActionListener(QTActionListener l)
          Deprecated. since QTJava 6.1
 void addMouseTargetListener(MouseTargetListener l)
          Deprecated. since QTJava 6.1
protected  void entered(QTMouseEvent e)
          Deprecated. since QTJava 6.1
protected  void exited(QTMouseEvent e)
          Deprecated. since QTJava 6.1
protected  void fireAction()
          Deprecated. since QTJava 6.1
 ImageSpec getDeactiveImage()
          Deprecated. since QTJava 6.1
 ImageSpec getPressedImage()
          Deprecated. since QTJava 6.1
 ImageSpec getReleasedImage()
          Deprecated. since QTJava 6.1
 ImageSpec getRolloverImage()
          Deprecated. since QTJava 6.1
 boolean isMouseInButton()
          Deprecated. since QTJava 6.1
 boolean isPressed()
          Deprecated. since QTJava 6.1
 void pressed()
          Deprecated. since QTJava 6.1
 void released()
          Deprecated. since QTJava 6.1
 void removeActionListener(QTActionListener l)
          Deprecated. since QTJava 6.1
 void removeMouseTargetListener(MouseTargetListener l)
          Deprecated. since QTJava 6.1
 void setDeactiveImage(ImageSpec image)
          Deprecated. since QTJava 6.1
 void setPressedImage(ImageSpec image)
          Deprecated. since QTJava 6.1
 void setReleasedImage(ImageSpec image)
          Deprecated. since QTJava 6.1
 void setRolloverImage(ImageSpec image)
          Deprecated. since QTJava 6.1
 
Methods inherited from class quicktime.app.ui.UIElement
addedToCompositor, getBounds, isActive, removedFromCompositor, setActive, setCurrentImage, setLocation, setSize
 
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

releasedImage

protected ImageSpec releasedImage
Deprecated. since QTJava 6.1

The image presented by the QTButton when it is in a released state. If a rollover image is specified, then this is presented when the mouse is outside the button, and the rolloverImage is presented when the mouse is inside the button.


rolloverImage

protected ImageSpec rolloverImage
Deprecated. 
If specified then the image presented by the QTButton when it is in a released state and the mouse is over the button.* @deprecated since QTJava 6.1


pressedImage

protected ImageSpec pressedImage
Deprecated. 
The image presented by the QTButton when it is in a pressed state.* @deprecated since QTJava 6.1


actionListener

protected QTActionListener actionListener
Deprecated. 
The QTActionListeners that will be fired when the QTButton is activated.* @deprecated since QTJava 6.1

Constructor Detail

QTButton

protected QTButton(ImageSpec releasedImage,
                   ImageSpec pressedImage,
                   ImageSpec deactiveImage,
                   ImageSpec rolloverImage)
            throws QTException
Deprecated. since QTJava 6.1

Sets the images of the UIElement as specified. The default location is 0,0, the default layer is 1 and there is no graphics mode assigned to the QTButton.

Parameters:
releasedImage - will be the currentImage of the UIElement
pressedImage - will be the image shown when the QTButton is pressed
deactiveImage - will be the deactiveImage of the UIElement
rolloverImage - will be the releasedImage of the UIElement when the mouse is over the button

QTButton

protected QTButton(ImageSpec releasedImage,
                   ImageSpec pressedImage,
                   ImageSpec deactiveImage,
                   ImageSpec rolloverImage,
                   Matrix matrix,
                   int layer,
                   GraphicsMode mode)
            throws QTException
Deprecated. since QTJava 6.1

Sets the images and display characteristics of the UIElement as specified.

Parameters:
releasedImage - will be the currentImage of the UIElement
pressedImage - will be the image shown when the QTButton is pressed
deactiveImage - will be the deactiveImage of the UIElement
rolloverImage - will be the releasedImage of the UIElement when the mouse is over the button
matrix - the display matrix properties of the UIElement
layer - the layer in which the UIElement will be presented
mode - the GraphicsMode of the UIElement.
Method Detail

released

public void released()
              throws QTException
Deprecated. since QTJava 6.1

Subclass provides the implementation for this method, though the subclass should ensure that super.released() is called. This method is called when the mouse button is released on the button, or the mouse leaves a pressed button.

QTException

setReleasedImage

public void setReleasedImage(ImageSpec image)
                      throws QTException
Deprecated. since QTJava 6.1

Sets a new image for the released state of the button.

Parameters:
image - the new released image
QTException

getReleasedImage

public ImageSpec getReleasedImage()
Deprecated. since QTJava 6.1

Returns:
the current image that is being used for the released state of the button

setRolloverImage

public void setRolloverImage(ImageSpec image)
                      throws QTException
Deprecated. since QTJava 6.1

Sets a new image for the rollover state of the button.

Parameters:
image - the new rollover image
QTException

getRolloverImage

public ImageSpec getRolloverImage()
Deprecated. since QTJava 6.1

Returns:
the current image that is being used for the rollover state of the button

setPressedImage

public void setPressedImage(ImageSpec image)
                     throws QTException
Deprecated. since QTJava 6.1

Sets a new image for the pressed state of the button.

Parameters:
image - the new pressed image
QTException

getPressedImage

public ImageSpec getPressedImage()
Deprecated. since QTJava 6.1

Returns:
the current image that is being used for the pressed state of the button

setDeactiveImage

public void setDeactiveImage(ImageSpec image)
                      throws QTException
Deprecated. since QTJava 6.1

Sets a new image for the deactive state of the button.

Parameters:
image - the new deactive image
QTException

getDeactiveImage

public ImageSpec getDeactiveImage()
Deprecated. since QTJava 6.1

Returns:
the current image that is being used for the deactive state of the button

pressed

public void pressed()
             throws QTException
Deprecated. since QTJava 6.1

Subclass provides the implementation for this method, though the subclass should ensure that super.pressed() is called. This method is called when the mouse button is pressed on the button and the mouse is in the buttton when pressed.

QTException

isPressed

public boolean isPressed()
Deprecated. since QTJava 6.1


isMouseInButton

public boolean isMouseInButton()
Deprecated. since QTJava 6.1


addActionListener

public void addActionListener(QTActionListener l)
Deprecated. since QTJava 6.1

Add an QTActionListeners to this button.

Parameters:
l - a new ActionListener

removeActionListener

public void removeActionListener(QTActionListener l)
Deprecated. since QTJava 6.1

Remove an ActionListener from this button.

Parameters:
l - a new QTActionListeners

addMouseTargetListener

public void addMouseTargetListener(MouseTargetListener l)
Deprecated. since QTJava 6.1

Add a MouseTargetListener for this QTButton. This listener will fire when the mouse enters or exits the button.

Parameters:
l - a new MouseTargetListener

removeMouseTargetListener

public void removeMouseTargetListener(MouseTargetListener l)
Deprecated. since QTJava 6.1

Remove a MouseTargetListener for this QTButton.

Parameters:
l - a MouseTargetListener to remove

entered

protected void entered(QTMouseEvent e)
                throws QTException
Deprecated. since QTJava 6.1

This method is called by the ButtonActivator when the mouse enters the button

QTException

exited

protected void exited(QTMouseEvent e)
               throws QTException
Deprecated. since QTJava 6.1

This method is called by the ButtonActivator when the mouse exits the button

QTException

fireAction

protected void fireAction()
Deprecated. since QTJava 6.1

This method is invoked by the event handling code so that any QTActionListeners actionPerformed methods are invoked.