quicktime.app.anim
Class SWController

java.lang.Object
  |
  +--quicktime.app.actions.MouseController
        |
        +--quicktime.app.anim.SWController
All Implemented Interfaces:
Collection, Controller, java.util.EventListener, Listener, ListenerController, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

Deprecated. since QTJava 4.0

public class SWController
extends MouseController

The SWController deals with SpriteWorldHitTest calls on the SpriteWorld that is contained by the SWCompositor's sub classes. By default it will do hit testing on the actual sprite image itself. However, an application can set the hit-test flags to support any mode of hit testing appropriate.

See Also:
QTMouseController

Field Summary
 
Fields inherited from class quicktime.app.actions.MouseController
xLocationOffset, yLocationOffset
 
Constructor Summary
SWController(MouseResponder mr, boolean wholeSpace)
          Deprecated. since QTJava 6.1
SWController(MouseResponder mr, boolean wholeSpace, int flags)
          Deprecated. since QTJava 6.1
 
Method Summary
protected  void deactivateResponder()
          Deprecated. since QTJava 6.1
 int getFlags()
          Deprecated. Returns the flags that control the hit test parameters on the SpriteWorld.
protected  java.lang.Object getSelected(java.awt.event.MouseEvent event)
          Deprecated. since QTJava 6.1
 Space getSpace()
          Deprecated. since QTJava 6.1
protected  void responderActivated()
          Deprecated. since QTJava 6.1
 void setFlags(int flags)
          Deprecated. Set the flags for controlling the hit test behaviour of the SpriteWorld.* @deprecated since QTJava 6.1
protected  void setTargetSpace(Space target)
          Deprecated. since QTJava 6.1
protected  void setTranslation()
          Deprecated. since QTJava 6.1
 
Methods inherited from class quicktime.app.actions.MouseController
addedTo, addedToSpace, addMember, doDragTarget, getResponder, hasMember, isAppropriate, isEmpty, isWholespace, members, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, removedFrom, removedFromSpace, removeMember, setWholespace, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWController

public SWController(MouseResponder mr,
                    boolean wholeSpace)
Deprecated. since QTJava 6.1

Construct a SWController object.

Parameters:
mr - the Responder that will respond to mouse events when a sprite is hit.
wholeSpace - if true all object that are in the space will be dragged. If false then you must explicitly add the object to the controller.

SWController

public SWController(MouseResponder mr,
                    boolean wholeSpace,
                    int flags)
Deprecated. since QTJava 6.1

Construct a SWController object.

Parameters:
mr - the Responder that will respond to mouse events when a sprite is hit.
wholeSpace - if true all object that are in the space will be dragged. If false then you must explicitly add the object to the controller.
flags - that will control the hit test parameters of the SpriteWorld
Method Detail

getSpace

public Space getSpace()
Deprecated. since QTJava 6.1

Returns the current Space that the SWController is attached to. This space will be an instance of the SWCompositor class.

Specified by:
getSpace in class MouseController
Returns:
the Space the controller is attached to.

setTargetSpace

protected void setTargetSpace(Space target)
Deprecated. since QTJava 6.1

Sets the target Space of the MouseController. This target must be a kind of SWCompositor class.

Specified by:
setTargetSpace in class MouseController
Parameters:
target - the potential target space for the SWController.

getFlags

public int getFlags()
Deprecated. 
Returns the flags that control the hit test parameters on the SpriteWorld. * @deprecated since QTJava 6.1


setFlags

public void setFlags(int flags)
Deprecated. 
Set the flags for controlling the hit test behaviour of the SpriteWorld.* @deprecated since QTJava 6.1


deactivateResponder

protected void deactivateResponder()
Deprecated. since QTJava 6.1

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

responderActivated

protected void responderActivated()
Deprecated. since QTJava 6.1

A notification method that is called whenever the MouseController activates its responder.

Overrides:
responderActivated in class MouseController

setTranslation

protected void setTranslation()
Deprecated. since QTJava 6.1

This method is used to setup translation values for x and y of an event to translate the event into the local coordinate space of a member's display Space. In the case of a DirectGroup the translation is (0, 0), in the case of a Compositor member (which can be embedded n-deep) the translation is the sum of the locations of the space's parents.

The method sets the value of the protected instance variables xLocationOffset and yLocation offset.

Overrides:
setTranslation in class MouseController

getSelected

protected java.lang.Object getSelected(java.awt.event.MouseEvent event)
                                throws QTException
Deprecated. since QTJava 6.1

This method is called when a MouseController has received a mouse event in its space. This method returns a TwoDSprite object if the SpriteWorld.hitTest method returns a Sprite at the event's location.

Specified by:
getSelected in class MouseController
Parameters:
event - a mouse down event
Returns:
a TwoDSprite object that is located at the event coordinates or null if no Sprite at the location of the event.
QTException