|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--quicktime.app.anim.TwoDSprite
|
+--quicktime.app.ui.UIElement
|
+--quicktime.app.ui.QTButton
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 |
protected ImageSpec releasedImage
protected ImageSpec rolloverImage
protected ImageSpec pressedImage
protected QTActionListener actionListener
| Constructor Detail |
protected QTButton(ImageSpec releasedImage,
ImageSpec pressedImage,
ImageSpec deactiveImage,
ImageSpec rolloverImage)
throws QTException
releasedImage - will be the currentImage of the UIElementpressedImage - will be the image shown when the QTButton is presseddeactiveImage - will be the deactiveImage of the UIElementrolloverImage - will be the releasedImage of the UIElement when the mouse is over the button
protected QTButton(ImageSpec releasedImage,
ImageSpec pressedImage,
ImageSpec deactiveImage,
ImageSpec rolloverImage,
Matrix matrix,
int layer,
GraphicsMode mode)
throws QTException
releasedImage - will be the currentImage of the UIElementpressedImage - will be the image shown when the QTButton is presseddeactiveImage - will be the deactiveImage of the UIElementrolloverImage - will be the releasedImage of the UIElement when the mouse is over the buttonmatrix - the display matrix properties of the UIElementlayer - the layer in which the UIElement will be presentedmode - the GraphicsMode of the UIElement.| Method Detail |
public void released()
throws QTException
QTException
public void setReleasedImage(ImageSpec image)
throws QTException
image - the new released image
QTExceptionpublic ImageSpec getReleasedImage()
public void setRolloverImage(ImageSpec image)
throws QTException
image - the new rollover image
QTExceptionpublic ImageSpec getRolloverImage()
public void setPressedImage(ImageSpec image)
throws QTException
image - the new pressed image
QTExceptionpublic ImageSpec getPressedImage()
public void setDeactiveImage(ImageSpec image)
throws QTException
image - the new deactive image
QTExceptionpublic ImageSpec getDeactiveImage()
public void pressed()
throws QTException
QTExceptionpublic boolean isPressed()
public boolean isMouseInButton()
public void addActionListener(QTActionListener l)
l - a new ActionListenerpublic void removeActionListener(QTActionListener l)
l - a new QTActionListenerspublic void addMouseTargetListener(MouseTargetListener l)
l - a new MouseTargetListenerpublic void removeMouseTargetListener(MouseTargetListener l)
l - a MouseTargetListener to remove
protected void entered(QTMouseEvent e)
throws QTException
QTException
protected void exited(QTMouseEvent e)
throws QTException
QTExceptionprotected void fireAction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||