|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.app.actions.MouseResponder | +--quicktime.app.actions.Dragger
The Dragger is a particular type of MouseResponder that performs the action of moving the Dragger's target (a Transformable object) according to the drag movements of the mouse.
Dragger's can be constrained to keep their target object completely within their enclosing space, or allow the target to be dragged out of that space to a default minimum view of 1 row or column of pixels of the target.
When a constraining condition is reached the Dragger will invoke the trigger method of an attached Actionable object.
NOTE: This class is no longer used and has been replaced by the new event model When converting your code, use a DragAction object in quicktime.app.event
Example:
Dragger dragger = new Dragger (MouseResponder.kAnyModifiersMask); GroupController controller1 = new GroupController (dragger, true); drawer.addController (controller1);This code is replaced with:
QTMouseTargetController qtmc = new QTMouseTargetController(true); qtmc.addQTMouseListener(new DragAction (new TranslateMatrix())); drawer.addController (qtmc);
QTMouseController
Field Summary | |
protected Actionable |
actor
Deprecated. The actor that will be invoked (if set) when the dragger reaches a constraining condition |
static int |
kConstrainAll
Deprecated. Use these as constraint flags to restrict dragging operations |
static int |
kConstrainBottom
Deprecated. Use these as constraint flags to restrict dragging operations |
static int |
kConstrainHorizontal
Deprecated. Use these as constraint flags to restrict dragging operations |
static int |
kConstrainLeft
Deprecated. Use these as constraint flags to restrict dragging operations |
static int |
kConstrainNone
Deprecated. Use these as constraint flags to restrict dragging operations |
static int |
kConstrainRight
Deprecated. Use these as constraint flags to restrict dragging operations |
static int |
kConstrainTop
Deprecated. Use these as constraint flags to restrict dragging operations |
static int |
kConstrainVertical
Deprecated. Use these as constraint flags to restrict dragging operations |
protected QTDrawable |
space
Deprecated. This is the QTDrawable space within which the Dragger's target is enclosed and contained |
protected Transformable |
target
Deprecated. This is the Transformable target of the Dragger action |
protected int |
xBufferIfUnConstrained
Deprecated. The number of pixels on the horizontal axis that an object can be dragged beyond the bounds if the dragging action is unconstrained. |
protected int |
yBufferIfUnConstrained
Deprecated. The number of pixels on the vertical axis that an object can be dragged beyond the bounds if the dragging action is unconstrained. |
Constructor Summary | |
Dragger(int modifierKeyMask)
Deprecated. Create a Dragger object |
|
Dragger(int modifierKeyMask,
int modifierTestConditions)
Deprecated. Create a Dragger object with specified modifier keys and test conditions under which those modifier keys are matched. |
|
Dragger(int modifierKeyMask,
int modifierTestConditions,
int additionalEvents)
Deprecated. Set some parameters that will create DragActions. |
Method Summary | |
Actionable |
getActionable()
Deprecated. This method retreives the current actor that is attached to the action |
int |
getConstrained()
Deprecated. Returns the current constraint setting |
boolean |
isAppropriate(java.lang.Object object)
Deprecated. The Dragger knows how to drag objects of type Transformable around. |
void |
mouseDragged(java.awt.event.MouseEvent event)
Deprecated. This method will allow the user to drag the transformable object around. |
void |
mousePressed(java.awt.event.MouseEvent event)
Deprecated. This method is called by the MouseController when the mouse is first pressed down on a valid Transformable object within the space it is controlling. |
protected void |
removeTarget()
Deprecated. When the MouseController detects that the drag operation is completed it notifies the Dragger to remove its target as the user no longer is dragging. |
void |
setActionable(Actionable actor)
Deprecated. This method sets the actionable object of the action. |
void |
setConstrained(int flag)
Deprecated. Using the constrain constants dragging can be constrained in any direction. |
protected void |
setTarget(java.lang.Object t)
Deprecated. Sets the target of the Dragger. |
protected void |
setTargetSpace(java.lang.Object o)
Deprecated. This method sets the containing Space of a target of a MouseResponder. |
Methods inherited from class quicktime.app.actions.MouseResponder |
activationEventType, deactivate, getMouseController, isActive, isInterested, isInterested, mouseClicked, mouseEntered, mouseEnteredTarget, mouseExited, mouseExitedTarget, mouseMoved, mouseReleased |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int kConstrainNone
public static final int kConstrainLeft
public static final int kConstrainRight
public static final int kConstrainTop
public static final int kConstrainBottom
public static final int kConstrainHorizontal
public static final int kConstrainVertical
public static final int kConstrainAll
protected Actionable actor
protected Transformable target
protected QTDrawable space
protected int xBufferIfUnConstrained
protected int yBufferIfUnConstrained
Constructor Detail |
public Dragger(int modifierKeyMask)
modifierKeyMask
- - if specified will determine which modifier keys must
be depressed for the action to be invoked. The modifierTestConditions is set
in this case to MouseResonder.kModifiersExactMatchpublic Dragger(int modifierKeyMask, int modifierTestConditions)
modifierKeyMask
- - if specified will determine which modifier keys must
be depressed for the action to be invoked.modifierTestConditions
- the test conditions under which the modifier mask is testedpublic Dragger(int modifierKeyMask, int modifierTestConditions, int additionalEvents)
modifierKeyMask
- - if specified will determine which modifier keys must
be depressed for the action to be invoked.modifierTestConditions
- the test conditions under which the modifier mask is testedadditionalEvents
- additional mouse events the responder will respond toMethod Detail |
protected void setTargetSpace(java.lang.Object o)
setTargetSpace
in class MouseResponder
o
- the containing space of the potential targets of the Dragger.public void setActionable(Actionable actor)
public Actionable getActionable()
public boolean isAppropriate(java.lang.Object object)
isAppropriate
in class MouseResponder
object
- the object to testprotected void setTarget(java.lang.Object t)
setTarget
in class MouseResponder
t
- the Transformable targetprotected void removeTarget()
removeTarget
in class MouseResponder
public void setConstrained(int flag)
flag
- constraint flagpublic int getConstrained()
public void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in class MouseResponder
event
- the mouse down event that may begin the drag actionpublic void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged
in class MouseResponder
event
- the mouse drag event that triggered the drag action.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |