|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.thestump.ghronos.timing.TimingStyle
Base class for all timing styles
Field Summary | |
protected boolean |
appliedToBottomClock
|
protected boolean |
appliedToTopClock
|
protected Clock |
toStart
|
protected Clock |
toStop
|
Constructor Summary | |
TimingStyle()
|
Method Summary | |
void |
applyTo(boolean topClock,
boolean bottomClock)
Sets which clocks this timing style is applied to |
protected void |
evaluate(Clock topClock,
Clock bottomClock)
Helper method used to set members describing current state |
abstract void |
execute(Clock topClock,
Clock bottomClock)
Applies the timing style to the appropriate clocks on a clock switch |
abstract java.lang.String |
getDescription()
Gets a description of this timing style which is used to display information about the timing style in a help dialog |
abstract byte |
getID()
|
abstract superwaba.ext.xplat.io.Storable |
getInstance()
|
boolean |
isAppliedTo(char clock)
Tells if this timing style is applied to the top or bottom clock |
void |
loadState(superwaba.ext.xplat.io.DataStream ds)
|
void |
onRegister(Clock topClock,
Clock bottomClock)
Called when this TimingStyle is registered with the Mediator. |
void |
onUnRegister(Clock topClock,
Clock bottomClock)
Called when this TimingStyle is unregistered with the Mediator (when another TimingStyle is registered). |
void |
saveState(superwaba.ext.xplat.io.DataStream ds)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Clock toStart
protected Clock toStop
protected boolean appliedToTopClock
protected boolean appliedToBottomClock
Constructor Detail |
public TimingStyle()
Method Detail |
public abstract void execute(Clock topClock, Clock bottomClock)
topClock
- The application's top clockbottomClock
- The application's bottom clockpublic abstract java.lang.String getDescription()
public void onRegister(Clock topClock, Clock bottomClock)
topClock
- bottomClock
- public void onUnRegister(Clock topClock, Clock bottomClock)
topClock
- bottomClock
- public void applyTo(boolean topClock, boolean bottomClock)
topClock
- true if the timing style should be applied to the top clock, false otherwisebottomClock
- true if the timing style should be applied to the bottom clock, false otherwisepublic boolean isAppliedTo(char clock)
clock
- 't' if we want to test for the top clock, 'b' if we want to test for the bottom clock
BadArgumentException
- If clock
is not 't' or 'b'public abstract byte getID()
getID
in interface superwaba.ext.xplat.io.Storable
public abstract superwaba.ext.xplat.io.Storable getInstance()
getInstance
in interface superwaba.ext.xplat.io.Storable
public void saveState(superwaba.ext.xplat.io.DataStream ds)
saveState
in interface superwaba.ext.xplat.io.Storable
public void loadState(superwaba.ext.xplat.io.DataStream ds)
loadState
in interface superwaba.ext.xplat.io.Storable
protected void evaluate(Clock topClock, Clock bottomClock)
topClock
- The application's topmost clockbottomClock
- The application's bottommost clock
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |