|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.thestump.ghronos.timing.TimingStyle
net.thestump.ghronos.timing.ot.OvertimeStyle
Base class for overtime-oriented timing styles
| Field Summary | |
protected boolean |
bottomClockInOt
|
protected boolean |
clockIsInOvertime
|
protected boolean |
isAppliedTo
|
protected byte[] |
overtime
|
protected boolean |
topClockInOt
|
protected boolean |
topClockIsTicking
|
| Fields inherited from class net.thestump.ghronos.timing.TimingStyle |
appliedToBottomClock, appliedToTopClock, toStart, toStop |
| Constructor Summary | |
OvertimeStyle()
|
|
| Method Summary | |
protected void |
evaluate(Clock topClock,
Clock bottomClock)
Helper method used to set members describing current state |
abstract void |
execute(Clock tickingClock)
Runs an overtime check on tickingClock when it
runs out of time to see if it should go into overtime or not |
abstract void |
execute(Clock topClock,
Clock bottomClock)
Applies the timing style to the appropriate clocks on a clock switch |
abstract byte |
getID()
|
abstract superwaba.ext.xplat.io.Storable |
getInstance()
|
byte[] |
getOvertime()
Returns an array of the current overtime. |
boolean |
isInOvertime(char clock)
Tells if a clock is currently in overtime |
void |
loadState(superwaba.ext.xplat.io.DataStream ds)
|
void |
reset()
Perform any resetting the timing style may need in between usages. |
void |
saveState(superwaba.ext.xplat.io.DataStream ds)
|
void |
setOvertime(byte[] ot)
Sets the overtime to the time given in the array. |
void |
setOvertime(char clock,
boolean inOvertime)
Sets the overtime state of a clock |
| Methods inherited from class net.thestump.ghronos.timing.TimingStyle |
applyTo, getDescription, isAppliedTo, onRegister, onUnRegister |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected byte[] overtime
protected boolean topClockInOt
protected boolean bottomClockInOt
protected boolean topClockIsTicking
protected boolean clockIsInOvertime
protected boolean isAppliedTo
| Constructor Detail |
public OvertimeStyle()
| Method Detail |
public abstract void execute(Clock tickingClock)
tickingClock when it
runs out of time to see if it should go into overtime or not
tickingClock - The currently ticking clock which should be checked for overtimepublic void reset()
public byte[] getOvertime()
public void setOvertime(byte[] ot)
ot - The time to be set
BadArgumentException - If ot is not of length 6
public void setOvertime(char clock,
boolean inOvertime)
clock - 't' if we want to configure the top clock, 'b' if we want to configure the bottom clockinOvertime - true if clock should be in overtime, false otherwise
BadArgumentException - If clock is not 't' or 'b'public boolean isInOvertime(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 void execute(Clock topClock,
Clock bottomClock)
TimingStyle
execute in class TimingStyletopClock - The application's top clockbottomClock - The application's bottom clockpublic abstract byte getID()
getID in interface superwaba.ext.xplat.io.StorablegetID in class TimingStylepublic abstract superwaba.ext.xplat.io.Storable getInstance()
getInstance in interface superwaba.ext.xplat.io.StorablegetInstance in class TimingStylepublic void saveState(superwaba.ext.xplat.io.DataStream ds)
saveState in interface superwaba.ext.xplat.io.StorablesaveState in class TimingStylepublic void loadState(superwaba.ext.xplat.io.DataStream ds)
loadState in interface superwaba.ext.xplat.io.StorableloadState in class TimingStyle
protected void evaluate(Clock topClock,
Clock bottomClock)
TimingStyle
evaluate in class TimingStyletopClock - 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 | |||||||||