|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kinetic.Behavior
base class used for all behaviors. provides the necessary routines that the engine calls to run the animation.
Field Summary | |
protected double |
current_time
stores the current time |
kinetic.KineticProperty |
duration
standard duration property |
boolean |
isDone
flag used to indicate completion |
protected kinetic.KineticProperty |
owner
stores what property this behavior is attached to |
protected java.util.ArrayList |
properties
list of properties the behavior has |
protected java.util.ArrayList |
timeFilters
list of time filters attached to the behavior |
Constructor Summary | |
protected |
Behavior()
constructs and empty behavior |
Method Summary | |
void |
addTimeFilter(kinetic.TimeFilter tf)
adds a new entry to this behavior's time filter list |
void |
apply(double time)
method called when the animation time is updated |
void |
clear()
clears all animation data this behavior knows about |
double |
getDuration()
returns the duration of the behavior |
java.util.ArrayList |
getPropertyList()
return the list of internal properties |
java.util.ArrayList |
getTimeFilterList()
gets the list of timefilters for this object |
boolean |
isDone()
returns true is the behavior has completed (currentTime > duration) |
double |
PrepareVariables(double time)
utility function to update that values all of internal properties and time filters. |
abstract void |
Process()
main routine that calculates a new value for the owner property |
void |
reset()
resets all/any persistent values inside the behavior |
void |
setOwner(kinetic.KineticProperty p)
sets the owner of this property |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected kinetic.KineticProperty owner
protected java.util.ArrayList properties
protected java.util.ArrayList timeFilters
public kinetic.KineticProperty duration
protected double current_time
public boolean isDone
Constructor Detail |
protected Behavior()
Method Detail |
public void setOwner(kinetic.KineticProperty p)
p
- the owner of this behaviorpublic void apply(double time)
time
- new animationpublic abstract void Process()
public double PrepareVariables(double time)
time
- aniamtion update time in milliseconds
public void addTimeFilter(kinetic.TimeFilter tf)
tf
- instance of a timefilterpublic java.util.ArrayList getPropertyList()
public double getDuration()
public boolean isDone()
public void reset()
public void clear()
public java.util.ArrayList getTimeFilterList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |