All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.app.actions.BounceAction
java.lang.Object
|
+----quicktime.app.actions.PeriodicAction
|
+----quicktime.app.actions.MatrixAction
|
+----quicktime.app.actions.BounceAction
- public class BounceAction
- extends MatrixAction
This class provides the capability of moving and bouncing a Transformable
object around within the space provided by the QTDrawable space that is
the space within which the transformable object is displayed, by the amount specified
by the deltaMatrix object.
-
deltaX
- The number of pixels left or right that the target is moved on
each invocation of the doAction method
-
deltaY
- The number of pixels up or down that the target is moved on
each invocation of the doAction method
-
BounceAction(int, int, QTDrawable, Transformable, float, float)
- Constructs a BounceAction object.
-
boundsReached(int)
- If the Matrix action is doing constraint bounds testing and a bounding
condition is reached the Matrix action calls this method with one of four
flags to indicate which side of the enclosing space the target collided with.
-
equals(Object)
- Returns true if the incoming object is a bounce action with the same target and
delta settings.
-
rateDirectionChanged(boolean)
- The Matrix action notifies subclasses when the rate at which an action is tickled changes
from positive to negative or vice versa.
-
transformMatrix(Matrix)
- The Matrix action calls the transformMatrix method with a Matrix that the subclass
should transform according to the particular transformation of the subclass.
deltaX
public float deltaX
- The number of pixels left or right that the target is moved on
each invocation of the doAction method
deltaY
public float deltaY
- The number of pixels up or down that the target is moved on
each invocation of the doAction method
BounceAction
public BounceAction(int scale,
int period,
QTDrawable space,
Transformable t,
float deltaX,
float deltaY) throws QTException
- Constructs a BounceAction object.
- Parameters:
- scale - the amount with which a second is divided into at a rate of one
- period - the number of scale ticks that elapse between invocations of the action.
- space - the space within which the object will be bounced and moved
- t - the target of the bounce action - the object that is moved
- deltaX - the amount by which the object is moved in the X dimension
- deltaY - the amount by which the object is moved in the Y dimension
rateDirectionChanged
protected void rateDirectionChanged(boolean forwards) throws QTException
- The Matrix action notifies subclasses when the rate at which an action is tickled changes
from positive to negative or vice versa.
- Overrides:
- rateDirectionChanged in class MatrixAction
transformMatrix
protected void transformMatrix(Matrix theMatrix) throws QTException
- The Matrix action calls the transformMatrix method with a Matrix that the subclass
should transform according to the particular transformation of the subclass.
- Parameters:
- theMatrix - the matrix to transform.
- Overrides:
- transformMatrix in class MatrixAction
boundsReached
protected void boundsReached(int whichSide)
- If the Matrix action is doing constraint bounds testing and a bounding
condition is reached the Matrix action calls this method with one of four
flags to indicate which side of the enclosing space the target collided with.
- Parameters:
- whichSide - a flag that indicates which side
- Overrides:
- boundsReached in class MatrixAction
equals
public boolean equals(Object obj)
- Returns true if the incoming object is a bounce action with the same target and
delta settings.
- Parameters:
- obj - the object to test
- Returns:
- true if equal, false if not
- Overrides:
- equals in class MatrixAction
All Packages Class Hierarchy This Package Previous Next Index