All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.app.display.GroupController

java.lang.Object
   |
   +----quicktime.app.actions.MouseController
           |
           +----quicktime.app.display.GroupController

public class GroupController
extends MouseController
This controller provides specific semantics for mouse control that deal specifically with GroupDrawable objects.

It implements the getSelected method to return the fronmost QTDrawable object at the location of the mouse event.


Constructor Index

 o GroupController(MouseResponder, boolean)
Constructs a GroupController with a MouseResponder that will respond to the mouse events of the controller.

Method Index

 o deactivateResponder()
A method that is called whenever the MouseController deactivates its responder.
 o getSelected(MouseEvent)
This method is called when a GroupController has received a mouse event in its space.
 o getSpace()
Returns the current GroupDrawable space that the controller is controlling.
 o mouseDragged(MouseEvent)
Drag the target QTDrawable that is effected by the delegated MouseResponder.
 o responderActivated()
A notification method that is called whenever the MouseController activates its responder.
 o setTargetSpace(Space)
Set the target space.

Constructors

 o GroupController
 public GroupController(MouseResponder mr,
                        boolean wholeSpace)
Constructs a GroupController with a MouseResponder that will respond to the mouse events of the controller.

Parameters:
mr - the mouse responder that will respond to mouse events
wholespace - if true all objects in the group come under control of the controller, if false group members must be specifically added to the group

Methods

 o getSpace
 public Space getSpace()
Returns the current GroupDrawable space that the controller is controlling.

Returns:
the current space
Overrides:
getSpace in class MouseController
 o setTargetSpace
 protected void setTargetSpace(Space target)
Set the target space. If the target object is not a GroupDrawable a ClassCastException is thrown.

Parameters:
target - the new GroupDrawable space for the controller.
Overrides:
setTargetSpace in class MouseController
 o getSelected
 protected Object getSelected(MouseEvent event) throws QTException
This method is called when a GroupController has received a mouse event in its space. This method returns the frontmost QTDrawable object at the event's location if it finds such an object at the location of the event.

Parameters:
event - a mouse down event
Returns:
a QTDrawable object that is located at the event coordinates or null
Overrides:
getSelected in class MouseController
 o deactivateResponder
 protected void deactivateResponder()
A method that is called whenever the MouseController deactivates its responder. A subclass should use this method to deactivate a responder (either explicitly or calling super.deactivateResponder). For example a user may have dragged a member out of a group, so the drag action's target is no longer valid and the Responder has no target to act upon.

Overrides:
deactivateResponder in class MouseController
 o responderActivated
 protected void responderActivated()
A notification method that is called whenever the MouseController activates its responder.

Overrides:
responderActivated in class MouseController
 o mouseDragged
 public void mouseDragged(MouseEvent e)
Drag the target QTDrawable that is effected by the delegated MouseResponder. This method ensures that the display logic of the GroupDrawable is kept updated due to any changes in the display characteristics of a mouseDragged event.

Parameters:
e - the mouse event that triggered the drag
Overrides:
mouseDragged in class MouseController

All Packages  Class Hierarchy  This Package  Previous  Next  Index