Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.app.actions
Class MouseResponder

    java.lang.Object
      |
      +--quicktime.app.actions.MouseResponder

Direct Known Subclasses:
  Dragger, GenericResponder

Deprecated. since QTJava 4.0

public abstract class MouseResponder
extends java.lang.Object

This class is an abstract class that is used to provide a base level functionality for objects that respond to Mouse events.

A responder responds to a mouse event based on three conditions being met.

- Modifier keys (or none) that determine if the responder is activated
- Matching conditions for the specified modifier keys - the default is kExactMatch
- Events that the particular responder is interested in. Some responders may only be interested in particular mouse events, for instance the Dragger is only interested in kPressReleaseEvent | kDragEvent

A responder is associated with a controller and when the event and modifiers are matched the controller activates the responder and sends events to the responder whilst the responder is active.

A responder in turn has a target for many mouse events (click, press, drag, release). In these event types the responder is only activated if the controller finds a target where the mouse was pressed. A mouseRelease event may NOT have occured when the mouse was over the selected target, whereas a mouseClick event indicates that the mouse was pressed and released over a particular target within the system mouse click time.

Mouse move, enter and exit events do not have a target - they relate to the space within which the controller has a declared interest.

See Also:
  `QTMouseController`

Field Summary
`static int` | `kAnyModifiers` Deprecated.
`static int` | `kAnyModifiersMask` Deprecated.
`static int` | `kAnyMouseEvent` Deprecated.
`static int` | `kAnyOneOfModifiers` Deprecated.
`static int` | `kClickEvents` Deprecated.
`static int` | `kDragEvents` Deprecated.
`static int` | `kEnterEvents` Deprecated.
`static int` | `kExitEvents` Deprecated.
`static int` | `kModifiersDisregarded` Deprecated.
`static int` | `kModifiersExactMatch` Deprecated.
`static int` | `kMouseEvents` Deprecated.
`static int` | `kMouseMotionEvents` Deprecated.
`static int` | `kMouseOrMouseMotionEvents` Deprecated.
`static int` | `kMoveEvents` Deprecated.
`static int` | `kNoModifiers` Deprecated.
`static int` | `kNoModifiersMask` Deprecated.
`static int` | `kPressReleaseEvents` Deprecated.
`static int` | `kQTMouseMotionEvents` Deprecated.
`static int` | `kRolloverEvents` Deprecated.
`static int` | `kSpecifiedModifiersOrNone` Deprecated.
`static int` | `kTargetMoveEvents` Deprecated.
`int` | `modifierKeyMask` Deprecated. The mask that is used to test which modifier keys will be regarded as valid
`int` | `modifierTestConditions` Deprecated. The conditions of the modifier keys that will invoke an event

Constructor Summary
`protected` | `MouseResponder(int modifierKeyMask, int modifierTestConditions, int eventTypes)` Deprecated. You pass in to this constructor the modifier keys and the conditions of the modifier test that will trigger the activation of the responder object.

Method Summary
`int` | `activationEventType()` Deprecated. Returns the event which activated the responder.
`protected void` | `deactivate()` Deprecated. A subclass can call this method to deactivate a responder.
`MouseController` | `getMouseController()` Deprecated. Returns the MouseController that the responder is attached to.
`boolean` | `isActive()` Deprecated. Returns true if the responder is currently active.
`abstract boolean` | `isAppropriate(java.lang.Object object)` Deprecated. The MouseController delegates the appropriateness of objects that it can control to the MouseResponder.
`boolean` | `isInterested(int eventType)` Deprecated. Returns true if the repsonder is interested in the specified event.
`boolean` | `isInterested(int eventType, int eventModifiers)` Deprecated. Returns true if the repsonder is interested in the specified event.
`void` | `mouseClicked(java.awt.event.MouseEvent e)` Deprecated. Invoked when the mouse has been clicked on a found and valid target within the enclosing space.
`void` | `mouseDragged(java.awt.event.MouseEvent e)` Deprecated. Invoked when the mouse has been dragged on a found and valid target within the enclosing space.
`void` | `mouseEntered(java.awt.event.MouseEvent e)` Deprecated. Invoked when the mouse enters a QTDrawable space.
`void` | `mouseEnteredTarget(java.awt.event.MouseEvent e)` Deprecated. Invoked when a mouseMoved event enters a Target within an enclosing space.
`void` | `mouseExited(java.awt.event.MouseEvent e)` Deprecated. Invoked when the mouse exits a QTDrawable space.
`void` | `mouseExitedTarget(java.awt.event.MouseEvent e)` Deprecated. Invoked when a mouseMoved event exits a Target within an enclosing space.
`void` | `mouseMoved(java.awt.event.MouseEvent e)` Deprecated. Invoked when the mouse button has been moved over a space.
`void` | `mousePressed(java.awt.event.MouseEvent e)` Deprecated. Invoked when the mouse has been pressed on a found and valid target within the enclosing space.
`void` | `mouseReleased(java.awt.event.MouseEvent e)` Deprecated. Invoked when the mouse has been released after being pressed on a found and valid target within the enclosing space.
`protected abstract void` | `removeTarget()` Deprecated. 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
`protected abstract void` | `setTarget(java.lang.Object target)` Deprecated. 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.
`protected abstract void` | `setTargetSpace(java.lang.Object s)` Deprecated. The MouseController asks its MouseResponder if the space it has been added to is an appropriate Space for the MouseResponder to deal with.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### kNoModifiersMask

    public static final int kNoModifiersMask

  Deprecated.

### kAnyModifiersMask

    public static final int kAnyModifiersMask

  Deprecated.

### kNoModifiers

    public static final int kNoModifiers

  Deprecated.

### kAnyModifiers

    public static final int kAnyModifiers

  Deprecated.

### kAnyOneOfModifiers

    public static final int kAnyOneOfModifiers

  Deprecated.

### kModifiersDisregarded

    public static final int kModifiersDisregarded

  Deprecated.

### kModifiersExactMatch

    public static final int kModifiersExactMatch

  Deprecated.

### kSpecifiedModifiersOrNone

    public static final int kSpecifiedModifiersOrNone

  Deprecated.

### kClickEvents

    public static final int kClickEvents

  Deprecated.

### kPressReleaseEvents

    public static final int kPressReleaseEvents

  Deprecated.

### kDragEvents

    public static final int kDragEvents

  Deprecated.

### kMoveEvents

    public static final int kMoveEvents

  Deprecated.

### kEnterEvents

    public static final int kEnterEvents

  Deprecated.

### kExitEvents

    public static final int kExitEvents

  Deprecated.

### kTargetMoveEvents

    public static final int kTargetMoveEvents

  Deprecated.

### kMouseEvents

    public static final int kMouseEvents

  Deprecated.

### kMouseMotionEvents

    public static final int kMouseMotionEvents

  Deprecated.

### kQTMouseMotionEvents

    public static final int kQTMouseMotionEvents

  Deprecated.

### kRolloverEvents

    public static final int kRolloverEvents

  Deprecated.

### kMouseOrMouseMotionEvents

    public static final int kMouseOrMouseMotionEvents

  Deprecated.

### kAnyMouseEvent

    public static final int kAnyMouseEvent

  Deprecated.

### modifierKeyMask

    public int modifierKeyMask

  Deprecated.
  The mask that is used to test which modifier keys will be regarded as valid

### modifierTestConditions

    public int modifierTestConditions

  Deprecated.
  The conditions of the modifier keys that will invoke an event

Constructor Detail

### MouseResponder

    protected MouseResponder(int modifierKeyMask,
                             int modifierTestConditions,
                             int eventTypes)

  Deprecated.
  You pass in to this constructor the modifier keys and the conditions of the modifier test that will trigger the activation of the responder object.
  Parameters:
    `modifierKeyMask` - the modifier key's mask
    `modifierTestConditions` - the test conditions under which the modifier mask is tested
    `eventTypes` - the mouse events the responder will respond to. This is a read-only property of the responder and determines the kinds of mouse events the responder responds to.

Method Detail

### setTargetSpace

    protected abstract void setTargetSpace(java.lang.Object s)

  Deprecated.
  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.

### getMouseController

    public MouseController getMouseController()

  Deprecated.
  Returns the MouseController that the responder is attached to.
  Returns:
    a MouseController

### isInterested

    public boolean isInterested(int eventType)

  Deprecated.
  Returns true if the repsonder is interested in the specified event.
  Parameters:
    `eventType` - to test interest
  Returns:
    true if interested, false if not

### isInterested

    public boolean isInterested(int eventType,
                                int eventModifiers)

  Deprecated.
  Returns true if the repsonder is interested in the specified event.
  Parameters:
    `eventType` - to test interest
    `eventModifiers` - modifier keys of mouse event
  Returns:
    true if interested, false if not

### setTarget

    protected abstract void setTarget(java.lang.Object target)

  Deprecated.
  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

### removeTarget

    protected abstract void removeTarget()

  Deprecated.
  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

### isAppropriate

    public abstract boolean isAppropriate(java.lang.Object object)

  Deprecated.
  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

### activationEventType

    public int activationEventType()

  Deprecated.
  Returns the event which activated the responder. If the responder is inactive this will return 0.
  Returns:
    the event type.

### isActive

    public boolean isActive()

  Deprecated.
  Returns true if the responder is currently active.
  Returns:
    true if active, false if not

### deactivate

    protected void deactivate()

  Deprecated.
  A subclass can call this method to deactivate a responder. It will not cancel a responder from becoming active again. For instance in drags if the object should no longer be dragged but the user is still going to broadcast mouseDrag events then you can deactivate the responder to ensure that the target will no longer be dragged.

### mouseClicked

    public void mouseClicked(java.awt.event.MouseEvent e)

  Deprecated.
  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

### mouseEntered

    public void mouseEntered(java.awt.event.MouseEvent e)

  Deprecated.
  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

### mouseExited

    public void mouseExited(java.awt.event.MouseEvent e)

  Deprecated.
  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

### mouseEnteredTarget

    public void mouseEnteredTarget(java.awt.event.MouseEvent e)

  Deprecated.
  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

### mouseExitedTarget

    public void mouseExitedTarget(java.awt.event.MouseEvent e)

  Deprecated.
  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

### mouseMoved

    public void mouseMoved(java.awt.event.MouseEvent e)

  Deprecated.
  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

### mousePressed

    public void mousePressed(java.awt.event.MouseEvent e)

  Deprecated.
  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

### mouseDragged

    public void mouseDragged(java.awt.event.MouseEvent e)

  Deprecated.
  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

### mouseReleased

    public void mouseReleased(java.awt.event.MouseEvent e)

  Deprecated.
  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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD