quicktime.app.actions
Class TransformMatrix

java.lang.Object
  |
  +--quicktime.app.actions.TransformMatrix
Direct Known Subclasses:
TranslateMatrix

Deprecated. since QTJava 6.1

public abstract class TransformMatrix
extends java.lang.Object

This class provides a standard mechanism for applying matrix manipulations to a Transformable target and supporting constraint bounding of the target's location after its matrix is altered.

The class presents two modes of operations, depending on which initialize and transformMatrix methods are applied and the class is generally used with this pairing. The notes for the initialize and transformMatrix methods document these usages.

A subclass defines the abstract methods to apply the particular transformation logic that they want to apply. If the kNoConstraint flag is applied then no constraints testing is done to keep the specified Transformable target constrained within the bounds of its enclosing space.


Field Summary
protected static int kBottomSide
          Deprecated. since QTJava 6.1
static int kConstraintSpecifiedAll
          Deprecated. since QTJava 6.1
static int kConstraintSpecifiedBottom
          Deprecated. since QTJava 6.1
static int kConstraintSpecifiedHorizontal
          Deprecated. since QTJava 6.1
static int kConstraintSpecifiedLeft
          Deprecated. since QTJava 6.1
static int kConstraintSpecifiedRight
          Deprecated. since QTJava 6.1
static int kConstraintSpecifiedTop
          Deprecated. since QTJava 6.1
static int kConstraintSpecifiedVertical
          Deprecated. since QTJava 6.1
static int kConstrainWithinAll
          Deprecated. since QTJava 6.1
static int kConstrainWithinBottom
          Deprecated. since QTJava 6.1
static int kConstrainWithinHorizontal
          Deprecated. since QTJava 6.1
static int kConstrainWithinLeft
          Deprecated. since QTJava 6.1
static int kConstrainWithinRight
          Deprecated. since QTJava 6.1
static int kConstrainWithinTop
          Deprecated. since QTJava 6.1
static int kConstrainWithinVertical
          Deprecated. since QTJava 6.1
protected static int kLeftSide
          Deprecated. since QTJava 6.1
static int kNoConstraint
          Deprecated. since QTJava 6.1
protected static int kRightSide
          Deprecated. since QTJava 6.1
protected static int kTopSide
          Deprecated. since QTJava 6.1
 int specifiedBottomConstraint
          Deprecated. since QTJava 6.1
 int specifiedLeftConstraint
          Deprecated. since QTJava 6.1
 int specifiedRightConstraint
          Deprecated. since QTJava 6.1
 int specifiedTopConstraint
          Deprecated. since QTJava 6.1
protected  Transformable target
          Deprecated. since QTJava 6.1
 
Constructor Summary
protected TransformMatrix()
          Deprecated. since QTJava 6.1
 
Method Summary
protected  void boundsReached(int whichSide)
          Deprecated. since QTJava 6.1
protected abstract  void doTransformation(Matrix theMatrix)
          Deprecated. since QTJava 6.1
protected abstract  void doTransformation(Matrix theMatrix, int deltaX, int deltaY)
          Deprecated. since QTJava 6.1
 boolean equals(java.lang.Object obj)
          Deprecated. since QTJava 6.1
 void flipTransformationSettings()
          Deprecated. since QTJava 6.1
 int getConstraint()
          Deprecated. Returns the current constraint setting * @deprecated since QTJava 6.1
 Transformable getTarget()
          Deprecated. since QTJava 6.1
 void initialize(QTDisplaySpace space, Transformable memberTarget)
          Deprecated. since QTJava 6.1
 void initialize(QTDisplaySpace space, Transformable memberTarget, int x, int y)
          Deprecated. since QTJava 6.1
 void setConstraint(int flag)
          Deprecated. since QTJava 6.1
 java.lang.String toString()
          Deprecated. Return a string representation of this class.
 boolean transformTarget()
          Deprecated. since QTJava 6.1
 boolean transformTarget(int newX, int newY)
          Deprecated. since QTJava 6.1
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kLeftSide

protected static final int kLeftSide
Deprecated. since QTJava 6.1

Used to nofify subclasses that the applied transformations have exceeded one of the sides of the enclosing space of the Transformable target.

See Also:
Constant Field Values

kRightSide

protected static final int kRightSide
Deprecated. since QTJava 6.1

Used to nofify subclasses that the applied transformations have exceeded one of the sides of the enclosing space of the Transformable target.

See Also:
Constant Field Values

kTopSide

protected static final int kTopSide
Deprecated. since QTJava 6.1

Used to nofify subclasses that the applied transformations have exceeded one of the sides of the enclosing space of the Transformable target.

See Also:
Constant Field Values

kBottomSide

protected static final int kBottomSide
Deprecated. since QTJava 6.1

Used to nofify subclasses that the applied transformations have exceeded one of the sides of the enclosing space of the Transformable target.

See Also:
Constant Field Values

kNoConstraint

public static final int kNoConstraint
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstrainWithinLeft

public static final int kConstrainWithinLeft
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstrainWithinRight

public static final int kConstrainWithinRight
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstrainWithinTop

public static final int kConstrainWithinTop
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstrainWithinBottom

public static final int kConstrainWithinBottom
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstrainWithinHorizontal

public static final int kConstrainWithinHorizontal
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstrainWithinVertical

public static final int kConstrainWithinVertical
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstrainWithinAll

public static final int kConstrainWithinAll
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstraintSpecifiedLeft

public static final int kConstraintSpecifiedLeft
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstraintSpecifiedRight

public static final int kConstraintSpecifiedRight
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstraintSpecifiedTop

public static final int kConstraintSpecifiedTop
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstraintSpecifiedBottom

public static final int kConstraintSpecifiedBottom
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstraintSpecifiedHorizontal

public static final int kConstraintSpecifiedHorizontal
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstraintSpecifiedVertical

public static final int kConstraintSpecifiedVertical
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

kConstraintSpecifiedAll

public static final int kConstraintSpecifiedAll
Deprecated. since QTJava 6.1

Use these as constraint flags to restrict transformations that relocated the the target within its space. The client of this class can either completely specify the number of pixels outside of the space that the target should be constrained to, or have the target completely constrained within the enclosing space, or specify that no constraints should be applied.

See Also:
Constant Field Values

target

protected Transformable target
Deprecated. since QTJava 6.1

This is the Transformable target (which MUST be a member of the space) of the TransformMatrix action. It is this target that has its matrix transformed by the subclass. It is set in the intialize method.


specifiedRightConstraint

public int specifiedRightConstraint
Deprecated. since QTJava 6.1

Specify the number of pixels that the target is constrained to when it is positioned beyond the right hand side. Its default value is 1, which means that its position is constrained to showing only 1 column (the left hand column) of the target's pixels.


specifiedLeftConstraint

public int specifiedLeftConstraint
Deprecated. since QTJava 6.1

Specify the number of pixels that the target is constrained to when it is positioned beyond the left hand side. Its default value is 1, which means that its position is constrained to showing only 1 column (the right hand column) of the target's pixels.


specifiedTopConstraint

public int specifiedTopConstraint
Deprecated. since QTJava 6.1

Specify the number of pixels that the target is constrained to when it is positioned beyond the top side. Its default value is 1, which means that its position is constrained to showing only 1 row (the bottom row) of the target's pixels.


specifiedBottomConstraint

public int specifiedBottomConstraint
Deprecated. since QTJava 6.1

Specify the number of pixels that the target is constrained to when it is positioned beyond the bottom side. Its default value is 1, which means that its position is constrained to showing only 1 row (the top row) of the target's pixels.

Constructor Detail

TransformMatrix

protected TransformMatrix()
Deprecated. since QTJava 6.1

Create a TransformMatrix class

Method Detail

toString

public java.lang.String toString()
Deprecated. 
Return a string representation of this class. * @deprecated since QTJava 6.1

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Deprecated. since QTJava 6.1

Returns true if the incoming object is a Matrix action with the same target.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to test
Returns:
true if equal, false if not

getTarget

public Transformable getTarget()
Deprecated. since QTJava 6.1

Returns:
the current target of this object.

setConstraint

public void setConstraint(int flag)
Deprecated. since QTJava 6.1

Using the constrain constants transformation of the target's matrix can be constrained in any direction.

Parameters:
flag - constraint flag

getConstraint

public int getConstraint()
Deprecated. 
Returns the current constraint setting * @deprecated since QTJava 6.1


initialize

public void initialize(QTDisplaySpace space,
                       Transformable memberTarget)
                throws QTException
Deprecated. since QTJava 6.1

This method is called to initialize the TransformMatrix operation. Typically this is used with the transformMatrix (Matrix) call. This version of the initialize call is used used with the MatrixAction class that applies some kind of transformation in the matrix each time that action is tickled.

The TransformMatrix operation need only be initialized when the space itself changes its size.

Parameters:
space - the space which the Transformable object is a member of.
QTException

initialize

public void initialize(QTDisplaySpace space,
                       Transformable memberTarget,
                       int x,
                       int y)
                throws QTException
Deprecated. since QTJava 6.1

This method is called to initialize the TransformMatrix operation. Typically this is used with the transformMatrix (Matrix, int deltaX, int deltaY) call. This version of the initialize call is used used with the DragAction where each time the user selects an object to drag the TransformMatrix is reinitialized.

Parameters:
space - the space which the Transformable object is a member of.
x - the x-origin about which the transformation is applied. In consequent calls to the transformMatrix (Matrix, int deltaX, int deltaY) method, the deltaX value is a delta from this specified origin.
y - the y-origin about which the transformation is applied. In consequent calls to the transformMatrix (Matrix, int deltaX, int deltaY) method, the deltaY value is a delta from this specified origin.
QTException

transformTarget

public boolean transformTarget()
                        throws QTException
Deprecated. since QTJava 6.1

This method will apply the transformation matrix to the target. It will call the doTransformation (Matrix) method.

Returns:
true if the this transformation reached a constraining condition
QTException

transformTarget

public boolean transformTarget(int newX,
                               int newY)
                        throws QTException
Deprecated. since QTJava 6.1

This method will apply the transformation matrix to the target. It will call the doTransformation (Matrix, int deltaX, int deltaY) method.

Parameters:
newX - the new x position expressed in the local coordinates of the space.
newY - the new y position expressed in the local coordinates of the space.
Returns:
true if the this transformation reached a constraining condition
QTException

flipTransformationSettings

public void flipTransformationSettings()
Deprecated. since QTJava 6.1

If a subclass is applying specified transformations to a matrix, then it should negate the value of these pre-defined transformation values. This is used in conjunction with the transformMatrix usage.


doTransformation

protected abstract void doTransformation(Matrix theMatrix,
                                         int deltaX,
                                         int deltaY)
                                  throws QTException
Deprecated. since QTJava 6.1

Applies the transformation of the Matrix.

Parameters:
theMatrix - The matrix handed in is the original matrix of the target when the TransformMatrix object was initialized.
deltaX - the difference between the original x point when the TransformMatrix object was initialized and the current location.
deltaY - the difference between the original y point when the TransformMatrix object was initialized and the current location.
QTException

doTransformation

protected abstract void doTransformation(Matrix theMatrix)
                                  throws QTException
Deprecated. since QTJava 6.1

Applies the transformation of the Matrix.

Parameters:
theMatrix - The matrix handed in is the current matrix of the target.
QTException

boundsReached

protected void boundsReached(int whichSide)
Deprecated. since QTJava 6.1

This method is called whenever a constraints test hits one of the sides of the enclosing space.

Parameters:
whichSide - indicates which side the constraints test hit.