quicktime.app.actions
Class TranslateMatrix
java.lang.Object
|
+--quicktime.app.actions.TransformMatrix
|
+--quicktime.app.actions.TranslateMatrix
- public class TranslateMatrix
- extends TransformMatrix
This class applies a matrix translation on the Transformable target.
Fields inherited from class quicktime.app.actions.TransformMatrix |
kBottomSide, kConstraintSpecifiedAll, kConstraintSpecifiedBottom, kConstraintSpecifiedHorizontal, kConstraintSpecifiedLeft, kConstraintSpecifiedRight, kConstraintSpecifiedTop, kConstraintSpecifiedVertical, kConstrainWithinAll, kConstrainWithinBottom, kConstrainWithinHorizontal, kConstrainWithinLeft, kConstrainWithinRight, kConstrainWithinTop, kConstrainWithinVertical, kLeftSide, kNoConstraint, kRightSide, kTopSide, specifiedBottomConstraint, specifiedLeftConstraint, specifiedRightConstraint, specifiedTopConstraint, target |
Method Summary |
protected void |
boundsReached(int whichSide)
Flips the delta values to achieve a "Bounce" type action when a constraining condition is reached. |
protected void |
doTransformation(Matrix theMatrix)
Applies the preset delta values to the incoming matrix. |
protected void |
doTransformation(Matrix theMatrix,
int deltaX,
int deltaY)
Applies the specified delta values to the incoming matrix. |
void |
flipTransformationSettings()
Flips the delta values to ensure that a MatrixAction usage of this class will
translate correctly when the rate at which the matrix action is invoked changes
direction. |
float |
getDeltaX()
|
float |
getDeltaY()
|
void |
setDeltaX(float x)
|
void |
setDeltaY(float y)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TranslateMatrix
public TranslateMatrix()
- Create a TranslateMatrix object. This constructor is used when
this class is used to translate the matrix of the target in reponse
to specific positioning relative to some origin. Typically used in a Drag operation.
TranslateMatrix
public TranslateMatrix(float deltaX,
float deltaY)
- Create a TranslateMatrix object. This constructor is used when
this class is used to translate the matrix of the target by some
specified delta each time the transformMatrix method is called.
Typically used with the MatrixAction class.
- Parameters:
deltaX
- the amount of pixels on the x axis the target will be translated.deltaY
- the amount of pixels on the y axis the target will be translated.
getDeltaX
public float getDeltaX()
- Returns:
- the current deltaX value
setDeltaX
public void setDeltaX(float x)
- Parameters:
x
- the new delta x to apply when the doTransformation(Matrix) method is called.
getDeltaY
public float getDeltaY()
- Returns:
- the current deltaY value
setDeltaY
public void setDeltaY(float y)
- Parameters:
y
- the new delta y to apply when the doTransformation(Matrix) method is called.
doTransformation
protected void doTransformation(Matrix theMatrix,
int deltaX,
int deltaY)
throws QTException
- Applies the specified delta values to the incoming matrix.
- Overrides:
doTransformation
in class TransformMatrix
- Parameters:
theMatrix
- The incoming matrix is the original matrix of the target when the TransformMatrix
was last initialized.deltaX
- the delta on the x-axis from the x value when the TransformMatrix
was last initialized.deltaY
- the delta on the y-axis from the x value when the TransformMatrix
was last initialized.
doTransformation
protected void doTransformation(Matrix theMatrix)
throws QTException
- Applies the preset delta values to the incoming matrix.
- Overrides:
doTransformation
in class TransformMatrix
- Parameters:
theMatrix
- The incoming matrix is the current matrix of the target.
boundsReached
protected void boundsReached(int whichSide)
- Flips the delta values to achieve a "Bounce" type action when a constraining condition is reached.
- Overrides:
boundsReached
in class TransformMatrix
- Parameters:
whichSide
- specifies which side of the enclosing bounds the target hit.
flipTransformationSettings
public void flipTransformationSettings()
- Flips the delta values to ensure that a MatrixAction usage of this class will
translate correctly when the rate at which the matrix action is invoked changes
direction.
- Overrides:
flipTransformationSettings
in class TransformMatrix