: Class Dragger
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
quicktime.app.actions
Class Dragger
java.lang.Object
|
+--quicktime.app.actions.MouseResponder
|
+--quicktime.app.actions.Dragger
Deprecated. since QTJava 4.0
public class Draggerextends MouseResponder
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);
See Also: 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.
Fields inherited from class quicktime.app.actions.MouseResponder
kAnyModifiers, kAnyModifiersMask, kAnyMouseEvent, kAnyOneOfModifiers, kClickEvents, kDragEvents, kEnterEvents, kExitEvents, kModifiersDisregarded, kModifiersExactMatch, kMouseEvents, kMouseMotionEvents, kMouseOrMouseMotionEvents, kMoveEvents, kNoModifiers, kNoModifiersMask, kPressReleaseEvents, kQTMouseMotionEvents, kRolloverEvents, kSpecifiedModifiersOrNone, kTargetMoveEvents, modifierKeyMask, modifierTestConditions
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
kConstrainNone
public static final int kConstrainNone
Deprecated. Use these as constraint flags to restrict dragging operations
kConstrainLeft
public static final int kConstrainLeft
Deprecated. Use these as constraint flags to restrict dragging operations
kConstrainRight
public static final int kConstrainRight
Deprecated. Use these as constraint flags to restrict dragging operations
kConstrainTop
public static final int kConstrainTop
Deprecated. Use these as constraint flags to restrict dragging operations
kConstrainBottom
public static final int kConstrainBottom
Deprecated. Use these as constraint flags to restrict dragging operations
kConstrainHorizontal
public static final int kConstrainHorizontal
Deprecated. Use these as constraint flags to restrict dragging operations
kConstrainVertical
public static final int kConstrainVertical
Deprecated. Use these as constraint flags to restrict dragging operations
kConstrainAll
public static final int kConstrainAll
Deprecated. Use these as constraint flags to restrict dragging operations
actor
protected Actionable actor
Deprecated. The actor that will be invoked (if set) when the dragger
reaches a constraining condition
target
protected Transformable target
Deprecated. This is the Transformable target of the Dragger action
space
protected QTDrawable space
Deprecated. This is the QTDrawable space within which the Dragger's target is enclosed and contained
xBufferIfUnConstrained
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. The default is one
yBufferIfUnConstrained
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. The default is one
Constructor Detail
Dragger
public Dragger(int modifierKeyMask)
Deprecated. Create a Dragger object
Parameters: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.kModifiersExactMatch
Dragger
public Dragger(int modifierKeyMask,
int modifierTestConditions)
Deprecated. Create a Dragger object with specified modifier keys and test conditions under
which those modifier keys are matched.
Parameters: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 tested
Dragger
public Dragger(int modifierKeyMask,
int modifierTestConditions,
int additionalEvents)
Deprecated. Set some parameters that will create DragActions.
Parameters: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 to
Method Detail
setTargetSpace
protected void setTargetSpace(java.lang.Object o)
Deprecated. This method sets the containing Space of a target of a MouseResponder.
For a Dragger this space must be a QTDrawable.
Overrides:setTargetSpace in class MouseResponder
Parameters:o - the containing space of the potential targets of the Dragger.
setActionable
public void setActionable(Actionable actor)
Deprecated. This method sets the actionable object of the action.
getActionable
public Actionable getActionable()
Deprecated. This method retreives the current actor that is attached to the action
isAppropriate
public boolean isAppropriate(java.lang.Object object)
Deprecated. The Dragger knows how to drag objects of type Transformable around.
Thus this method returns true if the incoming object implements the Transformable interface.
Overrides:isAppropriate in class MouseResponder
Parameters:object - the object to testReturns:a boolean
setTarget
protected void setTarget(java.lang.Object t)
Deprecated. Sets the target of the Dragger. Generally this will be some kind of Transformable object
that the user has clicked on and the MouseController has extracted. This becomes
the active Target of the Dragger for the duration of the mouseDrag event.
Overrides:setTarget in class MouseResponder
Parameters:t - the Transformable target
removeTarget
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.
Overrides:removeTarget in class MouseResponder
setConstrained
public void setConstrained(int flag)
Deprecated. Using the constrain constants dragging can be constrained in any direction.
Parameters:flag - constraint flag
getConstrained
public int getConstrained()
Deprecated. Returns the current constraint setting
mousePressed
public 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.
For efficiency it is assumed that the overall characteristics of the enclosing space
will not be changing during the duration of the drag event - ie. the Matrix
of the enclosing space is not changing during a mouse drag. However the Target's
matrix can and will change as a result of the drag operation.
Overrides:mousePressed in class MouseResponder
Parameters:event - the mouse down event that may begin the drag action
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent event)
Deprecated. This method will allow the user to drag the transformable object around.
This method also does constraints testing based on the current state
of the constraints.
Overrides:mouseDragged in class MouseResponder
Parameters:event - the mouse drag event that triggered the drag action.
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD