quicktime.app.actions
Class SequencerAction

java.lang.Object
  |
  +--quicktime.app.actions.PeriodicAction
        |
        +--quicktime.app.actions.SequencerAction
All Implemented Interfaces:
Ticklish
Direct Known Subclasses:
NextImageAction

public abstract class SequencerAction
extends PeriodicAction

This class is an abstract class for actions that interact with some kind of Sequencer. The doAction method is left for the subclass to define so that it can define the type of a Sequencer the action deals with. The constraining conditions of the Sequencer are dealt with by this class.


Field Summary
static int kConstraintAny
           
static int kConstraintFirst
           
static int kConstraintFirstOrLast
           
static int kConstraintLast
           
protected  Sequencer seq
          This is the Sequencer the action uses
 
Fields inherited from class quicktime.app.actions.PeriodicAction
actor, reschedule
 
Fields inherited from interface quicktime.app.time.Ticklish
kScale
 
Constructor Summary
protected SequencerAction(int scale, int period, Sequencer seq)
          Create a SequencerAction.
 
Method Summary
protected  boolean constraintReached()
          Subclasses should return true if after an action is triggered (the doAction method is called) the action has reached one of its specified constraint conditions and the actionable object should be triggered.
 boolean equals(java.lang.Object obj)
          Returns true if the objects are equal or false otherwise.
 int getConstraint()
          Gets the constraining condition of the actionable doAction method
 void setConstraint(int cons)
          Set the constraining condition that determines the cirumstances of when the attached actionable object is triggered.
 
Methods inherited from class quicktime.app.actions.PeriodicAction
doAction, getActionable, getPeriod, getScale, getTriggerCondition, setActionable, setPeriod, setScale, setTriggerCondition, tickle, timeChanged, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kConstraintAny

public static final int kConstraintAny

kConstraintFirst

public static final int kConstraintFirst

kConstraintLast

public static final int kConstraintLast

kConstraintFirstOrLast

public static final int kConstraintFirstOrLast

seq

protected Sequencer seq
This is the Sequencer the action uses
Constructor Detail

SequencerAction

protected SequencerAction(int scale,
                          int period,
                          Sequencer seq)
                   throws QTException
Create a SequencerAction.
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.
seq - the Sequencer.
Method Detail

setConstraint

public void setConstraint(int cons)
Set the constraining condition that determines the cirumstances of when the attached actionable object is triggered.
Parameters:
cons - the constraint

getConstraint

public int getConstraint()
Gets the constraining condition of the actionable doAction method
Returns:
the constraint

constraintReached

protected boolean constraintReached()
Subclasses should return true if after an action is triggered (the doAction method is called) the action has reached one of its specified constraint conditions and the actionable object should be triggered. How this is defined is determined totally by the subclass.
Overrides:
constraintReached in class PeriodicAction
Returns:
true if the actionable object (if set) should be triggered

equals

public boolean equals(java.lang.Object obj)
Returns true if the objects are equal or false otherwise.
Overrides:
equals in class PeriodicAction
Parameters:
obj - the object to test
Returns:
a boolean