quicktime.app.players
Class QTPlayerAWTEventHandler

java.lang.Object
  |
  +--quicktime.app.players.QTPlayerEventHandler
        |
        +--quicktime.app.players.QTPlayerAWTEventHandler
All Implemented Interfaces:
java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener

public class QTPlayerAWTEventHandler
extends QTPlayerEventHandler
implements java.awt.event.MouseListener, java.awt.event.KeyListener

When a QTPlayer is addedTo some kind of java.awt.Component the default construction methods of the QTPlayerEventHandler will create an instance of this object.

If applications want to provide customised event handling for a QTPlayer they can subclass this object and register their custom event handler with the QTPlayerEventHandler class.

The QTPlayerAWTEventHandler will handle mousePressed methods and keyPressed methods.


Field Summary
protected  java.awt.Component component
          The java.awt.Component to which the QTPlayer has been added.
protected  QTPlayer player
          The QTPlayer this object handles events for
 
Constructor Summary
protected QTPlayerAWTEventHandler(QTPlayer player, java.lang.Object interest)
          Construct a QTPlayerAWTEventHandler where the object of interest for events is some kind of java.awt.Component.
 
Method Summary
protected  void addedTo()
          Registers interests in mouse and key events with the java.awt.Component
 void keyPressed(java.awt.event.KeyEvent e)
          Key pressed events are passed on to the movie controller
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
          Mouse pressed events are passed on to the movie controller
 void mouseReleased(java.awt.event.MouseEvent e)
           
protected  void removedFrom()
          Removes any interests in mouse and key events with the java.awt.Component
 
Methods inherited from class quicktime.app.players.QTPlayerEventHandler
registerEventHandlerMaker, removeEventHandlerMaker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

player

protected QTPlayer player
The QTPlayer this object handles events for

component

protected java.awt.Component component
The java.awt.Component to which the QTPlayer has been added.
Constructor Detail

QTPlayerAWTEventHandler

protected QTPlayerAWTEventHandler(QTPlayer player,
                                  java.lang.Object interest)
Construct a QTPlayerAWTEventHandler where the object of interest for events is some kind of java.awt.Component.
Parameters:
p - the QTPlayer that this object should handle events for.
interest - the source of events.
Method Detail

addedTo

protected void addedTo()
Registers interests in mouse and key events with the java.awt.Component
Overrides:
addedTo in class QTPlayerEventHandler

removedFrom

protected void removedFrom()
Removes any interests in mouse and key events with the java.awt.Component
Overrides:
removedFrom in class QTPlayerEventHandler

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Key pressed events are passed on to the movie controller
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Mouse pressed events are passed on to the movie controller
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener