All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.app.actions.GenericResponder
java.lang.Object
|
+----quicktime.app.actions.MouseResponder
|
+----quicktime.app.actions.GenericResponder
- public class GenericResponder
- extends MouseResponder
This is a generic responder for MouseEvents. It places no conditions on the the containing
space or target. An application can also register QTMouseListeners and MouseListeners with this responder
in which case the GenericResponder will invoke the appropriate method on the registered listeners.
-
space
- This is the QTDrawable space within which the Dragger's target is enclosed and contained
-
target
- This is the Transformable target of the Dragger action
-
GenericResponder(int, int, int)
- Set some parameters that will create a GenericResponder that will respond
to all mouse events (including mouseMoveTarget events).
-
addMouseListener(MouseListener)
- Registers a MouseListener to this responder.
-
addMouseMotionListener(MouseMotionListener)
- Registers a MouseListener to this responder.
-
addQTMouseMotionListener(QTMouseMotionListener)
- Registers a QTMouseMotionListener to this responder.
-
asAnyMouseListener(int, int)
- Creates a GenericResponder that is interested in mouse events that
are covered by the MouseListener, MouseMotionListener or QTMouseMotionListener interfaces.
-
asMouseListener(int, int)
- Creates a GenericResponder that is interested in mouse events that
are covered by the MouseListener interface.
-
asMouseMotionListener(int, int)
- Creates a GenericResponder that is interested in mouse events that
are covered by the MouseMotionListener interface.
-
asMouseOrMouseMotionListener(int, int)
- Creates a GenericResponder that is interested in mouse events that
are covered by the MouseListener or MouseMotionListener interfaces.
-
asQTMouseMotionListener(int, int)
- Creates a GenericResponder that is interested in mouse events that
are covered by the QTMouseMotionListener interface.
-
asRolloverListener(int, int)
- Creates a GenericResponder that is interested in mouse events that
are covered by the QTMouseMotionListener interface.
-
getSpace()
- Returns the Space that the controller has been attached too.
-
getTarget()
- Returns the Target that the controller is currently controlling.
-
isAppropriate(Object)
- The MouseController delegates the appropriateness of objects that it can control
to the MouseResponder.
-
mouseClicked(MouseEvent)
- Invoked when the mouse has been clicked on a found and valid target within the enclosing space.
-
mouseDragged(MouseEvent)
- Invoked when the mouse has been dragged on a found and valid target within the enclosing space.
-
mouseEntered(MouseEvent)
- Invoked when the mouse enters a QTDrawable space.
-
mouseEnteredTarget(MouseEvent)
- Invoked when a mouseMoved event enters a Target within an enclosing space.
-
mouseExited(MouseEvent)
- Invoked when the mouse exits a QTDrawable space.
-
mouseExitedTarget(MouseEvent)
- Invoked when a mouseMoved event exits a Target within an enclosing space.
-
mouseMoved(MouseEvent)
- Invoked when the mouse button has been moved over a space.
-
mousePressed(MouseEvent)
- Invoked when the mouse has been pressed on a found and valid target within the enclosing space.
-
mouseReleased(MouseEvent)
- Invoked when the mouse has been released after being pressed on a found and valid target within the enclosing space.
-
removeMouseListener(MouseListener)
- Removes the specified MouseListener from the GenericResponder.
-
removeMouseMotionListener(MouseMotionListener)
- Removes the specified MouseListener from the GenericResponder.
-
removeQTMouseMotionListener(QTMouseMotionListener)
- Removes the specified QTMouseMotionListener from the GenericResponder.
-
removeTarget()
- When the Responder is deactivated from the MouseController the controller
uses this method to tell the Responder that it no longer has a target
to act upon
-
setTarget(Object)
- This method is called by the MouseController when it has returned a target
(say from a mousePressed event) and the Controller sets the target that the
MouseResponder will then respond to.
-
setTargetSpace(Object)
- The MouseController asks its MouseResponder if the space it has been added to is
an appropriate Space for the MouseResponder to deal with.
target
protected Object target
- This is the Transformable target of the Dragger action
space
protected Object space
- This is the QTDrawable space within which the Dragger's target is enclosed and contained
GenericResponder
public GenericResponder(int modifierKeyMask,
int modifierTestConditions,
int eventTypes)
- Set some parameters that will create a GenericResponder that will respond
to all mouse events (including mouseMoveTarget events).
- Parameters:
- modifierKeyMask - determines which modifier keys (or none) which must
be depressed for the action to be invoked.
- modifierTestConditions - determines the conditions under which the responder is
activated when the specified modifierKeyMask conditions are met.
- eventTypes - specifies the mouse event types that the responder is interested in.
asMouseListener
public static GenericResponder asMouseListener(int modifierKeyMask,
int modifierTestConditions)
- Creates a GenericResponder that is interested in mouse events that
are covered by the MouseListener interface.
- Parameters:
- modifierKeyMask - the state of the modifier keys to activate this responder
- modifierTestConditions - the match criteria that are applied to the modifier keys
- Returns:
- a GenericResponder
- See Also:
- kMouseEvents
asMouseMotionListener
public static GenericResponder asMouseMotionListener(int modifierKeyMask,
int modifierTestConditions)
- Creates a GenericResponder that is interested in mouse events that
are covered by the MouseMotionListener interface.
- Parameters:
- modifierKeyMask - the state of the modifier keys to activate this responder
- modifierTestConditions - the match criteria that are applied to the modifier keys
- Returns:
- a GenericResponder
- See Also:
- kMouseMotionEvents
asMouseOrMouseMotionListener
public static GenericResponder asMouseOrMouseMotionListener(int modifierKeyMask,
int modifierTestConditions)
- Creates a GenericResponder that is interested in mouse events that
are covered by the MouseListener or MouseMotionListener interfaces.
- Parameters:
- modifierKeyMask - the state of the modifier keys to activate this responder
- modifierTestConditions - the match criteria that are applied to the modifier keys
- Returns:
- a GenericResponder
- See Also:
- kMouseOrMouseMotionEvents
asQTMouseMotionListener
public static GenericResponder asQTMouseMotionListener(int modifierKeyMask,
int modifierTestConditions)
- Creates a GenericResponder that is interested in mouse events that
are covered by the QTMouseMotionListener interface. This is ideal for doing
rollover effects on member objects in a QT space where the objects are stationary as
these objects have no need for the MouseExit event.
- Parameters:
- modifierKeyMask - the state of the modifier keys to activate this responder
- modifierTestConditions - the match criteria that are applied to the modifier keys
- Returns:
- a GenericResponder
- See Also:
- kQTMouseMotionEvents
asRolloverListener
public static GenericResponder asRolloverListener(int modifierKeyMask,
int modifierTestConditions)
- Creates a GenericResponder that is interested in mouse events that
are covered by the QTMouseMotionListener interface. This is ideal for doing
rollover effects on member objects in a QT space where the objects can be
repositioned by dragging by the user as the object is notified by
a MouseExit method from the MouseListener interest.
- Parameters:
- modifierKeyMask - the state of the modifier keys to activate this responder
- modifierTestConditions - the match criteria that are applied to the modifier keys
- Returns:
- a GenericResponder
- See Also:
- kRolloverEvents
asAnyMouseListener
public static GenericResponder asAnyMouseListener(int modifierKeyMask,
int modifierTestConditions)
- Creates a GenericResponder that is interested in mouse events that
are covered by the MouseListener, MouseMotionListener or QTMouseMotionListener interfaces.
- Parameters:
- modifierKeyMask - the state of the modifier keys to activate this responder
- modifierTestConditions - the match criteria that are applied to the modifier keys
- Returns:
- a GenericResponder
- See Also:
- kAnyMouseEvent
setTargetSpace
protected void setTargetSpace(Object s)
- The MouseController asks its MouseResponder if the space it has been added to is
an appropriate Space for the MouseResponder to deal with. If not the MouseResponder
subclass that implements this method throws a ClassCastException and the MouseController
will not be added to the Space.
- Parameters:
- s - the Space to which the responder's controller has been added.
- Overrides:
- setTargetSpace in class MouseResponder
setTarget
protected void setTarget(Object target)
- This method is called by the MouseController when it has returned a target
(say from a mousePressed event) and the Controller sets the target that the
MouseResponder will then respond to.
- Parameters:
- target - the object that is the selected target of the MouseEvent
- Overrides:
- setTarget in class MouseResponder
removeTarget
protected void removeTarget()
- When the Responder is deactivated from the MouseController the controller
uses this method to tell the Responder that it no longer has a target
to act upon
- Overrides:
- removeTarget in class MouseResponder
getSpace
public Object getSpace()
- Returns the Space that the controller has been attached too.
- Returns:
- the container space.
getTarget
public Object getTarget()
- Returns the Target that the controller is currently controlling. This will be
null if the mouse event is not targetted, or the Responder is not currently
responding to a mouse event.
- Returns:
- the current target or null
isAppropriate
public boolean isAppropriate(Object object)
- The MouseController delegates the appropriateness of objects that it can control
to the MouseResponder. The MouseResponder returns true if the given object is
the type of object that it can control.
- Parameters:
- object - the object to test
- Returns:
- true if the object is the type of object that the Responder can control
- Overrides:
- isAppropriate in class MouseResponder
mouseClicked
public void mouseClicked(MouseEvent e)
- Invoked when the mouse has been clicked on a found and valid target within the enclosing space.
- Parameters:
- e - the MouseEvent that triggered this event
- Overrides:
- mouseClicked in class MouseResponder
mouseEntered
public void mouseEntered(MouseEvent e)
- Invoked when the mouse enters a QTDrawable space. There is no target set for events of this kind.
- Parameters:
- e - the MouseEvent that triggered this event
- Overrides:
- mouseEntered in class MouseResponder
mouseExited
public void mouseExited(MouseEvent e)
- Invoked when the mouse exits a QTDrawable space. There is no target set for events of this kind.
- Parameters:
- e - the MouseEvent that triggered this event
- Overrides:
- mouseExited in class MouseResponder
mouseEnteredTarget
public void mouseEnteredTarget(MouseEvent e)
- Invoked when a mouseMoved event enters a Target within an enclosing space. The Target is set for events of this kind.
- Parameters:
- e - the MouseEvent that triggered this event
- Overrides:
- mouseEnteredTarget in class MouseResponder
mouseExitedTarget
public void mouseExitedTarget(MouseEvent e)
- Invoked when a mouseMoved event exits a Target within an enclosing space. The Target is set for events of this kind.
- Parameters:
- e - the MouseEvent that triggered this event
- Overrides:
- mouseExitedTarget in class MouseResponder
mouseMoved
public void mouseMoved(MouseEvent e)
- Invoked when the mouse button has been moved over a space. There is no target set for events of this kind.
(with no buttons no down).
- Parameters:
- e - the MouseEvent that triggered this event
- Overrides:
- mouseMoved in class MouseResponder
mousePressed
public void mousePressed(MouseEvent e)
- Invoked when the mouse has been pressed on a found and valid target within the enclosing space.
- Parameters:
- e - the MouseEvent that triggered this event
- Overrides:
- mousePressed in class MouseResponder
mouseDragged
public void mouseDragged(MouseEvent e)
- Invoked when the mouse has been dragged on a found and valid target within the enclosing space.
This method is only called if the responder has been activated by a mouse pressed event.
- Parameters:
- e - the MouseEvent that triggered this event
- Overrides:
- mouseDragged in class MouseResponder
mouseReleased
public void mouseReleased(MouseEvent e)
- Invoked when the mouse has been released after being pressed on a found and valid target within the enclosing space.
- Parameters:
- e - the MouseEvent that triggered this event
- Overrides:
- mouseReleased in class MouseResponder
addQTMouseMotionListener
public void addQTMouseMotionListener(QTMouseMotionListener ql)
- Registers a QTMouseMotionListener to this responder. The listener will be invoked with any of the
mouse events the responder is invoked by. If the Responder has not been created to listen to these
type of events then the listener will not be registered. The application can test this
by calling:
myGenericResponder.isInterested (MouseResponder.kQTMouseMotionEvents)
The intereste in mouseMotionEvents is a contained interest of QTMouseMotion events, and is thus
the minimal requirement to register this kind of listener.
- Parameters:
- ql - the new QTMouseMotionListener
removeQTMouseMotionListener
public void removeQTMouseMotionListener(QTMouseMotionListener ql)
- Removes the specified QTMouseMotionListener from the GenericResponder.
- Parameters:
- ql - the QTMouseMotionListener to remove
addMouseListener
public void addMouseListener(MouseListener ml)
- Registers a MouseListener to this responder. The listener will be invoked with any of the
mouse events the responder is invoked by. If the Responder has not been created to listen to these
type of events then the listener will not be registered. The application can test this
by calling:
myGenericResponder.isInterested (MouseResponder.kMouseEvents)
- Parameters:
- ml - the new MouseListener
removeMouseListener
public void removeMouseListener(MouseListener ml)
- Removes the specified MouseListener from the GenericResponder.
- Parameters:
- ml - the MouseListener to remove
addMouseMotionListener
public void addMouseMotionListener(MouseMotionListener ml)
- Registers a MouseListener to this responder. The listener will be invoked with any of the
mouse events the responder is invoked by. If the Responder has not been created to listen to these
type of events then the listener will not be registered. The application can test this
by calling:
myGenericResponder.isInterested (MouseResponder.kMouseMotionEvents)
- Parameters:
- ml - the new MouseListener
removeMouseMotionListener
public void removeMouseMotionListener(MouseMotionListener ml)
- Removes the specified MouseListener from the GenericResponder.
- Parameters:
- ml - the MouseListener to remove
All Packages Class Hierarchy This Package Previous Next Index