|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectconstraint.LayeredConstraint
Skeleton class for Constraint implementations.
Implementation classes for constraints can extend this class and override only
the getLevel, doAction and getMonitoredEvents methods.
Each time an action is performed that might affect a child constraint, this
class begins the firing sequence. Any action event will trigger the firing sequence
and any key or mouse event that is in some constraint's m onitored events list
will trigger the firing sequence.
When the sequence fires, it uses the controller's event queue to coordinate
calling doAction on all level one constraints, then on all level two constraints,
then level three, and finally level four. If some other event is discovered in the
controller queue, the firing sequence begins again.
Thus, level one constraints, on the other hand, are guaranteed to be activated once for
each triggering event. During heavy user usage, however, level two, three and four
constraints may not act as frequently as level one constraints.
Constraints that act directly on user input, or simulate user input should
implement ConstraintAdapter instead of this class.
| Field Summary |
| Constructor Summary | |
LayeredConstraint()
|
|
| Method Summary | |
abstract void |
doAction(TaskProperties tp)
Performs the constraint's action. |
int |
getIntValue()
Returns the value converted to an int, or zero if the conversion fails. |
abstract int |
getLevel()
Returns the level of callback for this constraint. |
int[] |
getMonitoredKeyEvents()
Returns an array of KeyEvent ids that will generate a callback. |
int[] |
getMonitoredMouseEvents()
Returns an array of MouseEvent ids that will generate a callback. |
java.lang.String |
getType()
|
java.lang.String |
getValue()
|
void |
process(EventWrapper ev,
TaskProperties tp)
Manages callback levels and event processing. |
void |
processInit(TaskProperties tp)
Called at the beginning of a task. |
void |
setValue(java.lang.String value,
java.lang.String type,
TaskProperties tp)
Performs task initialization code. |
java.lang.String |
toString()
Returns the fully qualified pathname of the constraint. |
protected boolean |
valueContains(java.lang.String token)
Performs case-insensitive search for token in the value of this constraint. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LayeredConstraint()
| Method Detail |
public void process(EventWrapper ev,
TaskProperties tp)
process in interface Constraintpublic int[] getMonitoredMouseEvents()
public int[] getMonitoredKeyEvents()
public abstract int getLevel()
public abstract void doAction(TaskProperties tp)
public void processInit(TaskProperties tp)
public void setValue(java.lang.String value,
java.lang.String type,
TaskProperties tp)
setValue in interface Constraintpublic java.lang.String getValue()
getValue in interface Constraintpublic int getIntValue()
protected boolean valueContains(java.lang.String token)
public java.lang.String getType()
getType in interface Constraintpublic java.lang.String toString()
|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.