quicktime.app.actions
Class DragAction
java.lang.Object
|
+--quicktime.app.event.DragAdapter
|
+--quicktime.app.actions.DragAction
- All Implemented Interfaces:
- java.util.EventListener, MouseButtonListener, MouseMoveListener, QTMouseListener
- public class DragAction
- extends DragAdapter
The DragAction is a drag adapter that delegates the role of responding to a
mouse drag event to the TransformMatrix transformer. It is a utility class
that assumes that the mousePressed method will select a Transformable target
and the mouseDragged method will alter the matrix of this target
in some manner.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DragAction
public DragAction(TransformMatrix transformer)
- Create a DragAction object.
- Parameters:
transformer
- this is the object that will apply the matrix transformations in reponse
to a mouseDragged event.
getActionable
public Actionable getActionable()
- This method retreives the current actor that is attached to the action
setActionable
public void setActionable(Actionable actor)
- This method sets the actionable object of the action.
setTransformer
public void setTransformer(TransformMatrix transformer)
- This method sets the actionable object of the action.
getTransformer
public TransformMatrix getTransformer()
- This method retreives the current actor that is attached to the action
mousePressed
public void mousePressed(QTMouseEvent event)
- Initializes the currently set TransformMatrix object to the current coordinates of
the mouse event.
- Overrides:
mousePressed
in class DragAdapter
- Parameters:
event
- the mouse event that triggers the drag action
mouseDragged
public void mouseDragged(QTMouseEvent event)
- Responds to the mouseDragged event by calling the transformTarget (int x, int y) method
on the set TransformMatrix object.
- Overrides:
mouseDragged
in class DragAdapter
- Parameters:
event
- the mouse event that triggers the drag action