|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.thestump.ghronos.timing.TimingStyle net.thestump.ghronos.timing.ot.OvertimeStyle net.thestump.ghronos.timing.ot.JapaneseBY
Provides a Japanese Byo-Yomi timing style.
Field Summary | |
static byte |
ID
Timing style/Storable ID |
static java.lang.String |
NAME
Name of timing style |
Fields inherited from class net.thestump.ghronos.timing.ot.OvertimeStyle |
bottomClockInOt, clockIsInOvertime, isAppliedTo, overtime, topClockInOt, topClockIsTicking |
Fields inherited from class net.thestump.ghronos.timing.TimingStyle |
appliedToBottomClock, appliedToTopClock, toStart, toStop |
Constructor Summary | |
JapaneseBY()
|
Method Summary | |
protected void |
evaluate(Clock topClock,
Clock bottomClock)
Helper method used to set members describing current state |
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 |
void |
execute(Clock topClock,
Clock bottomClock)
Applies the timing style to the appropriate clocks on a clock switch |
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 |
byte |
getID()
|
superwaba.ext.xplat.io.Storable |
getInstance()
|
int |
getPeriods()
Gets the number of periods set for the overtime sessions |
int |
getPeriodsLeft(char clock)
Gets the number of periods left for the current overtime session |
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 |
reset()
Perform any resetting the timing style may need in between usages. |
void |
saveState(superwaba.ext.xplat.io.DataStream ds)
|
void |
setPeriods(int per)
Sets the number of periods for the overtime sessions |
java.lang.String |
toString()
|
Methods inherited from class net.thestump.ghronos.timing.ot.OvertimeStyle |
getOvertime, isInOvertime, setOvertime, setOvertime |
Methods inherited from class net.thestump.ghronos.timing.TimingStyle |
applyTo, isAppliedTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte ID
public static final java.lang.String NAME
Constructor Detail |
public JapaneseBY()
Method Detail |
public int getPeriods()
public void setPeriods(int per)
per
- The number of periodspublic void onRegister(Clock topClock, Clock bottomClock)
TimingStyle
onRegister
in class TimingStyle
topClock
- bottomClock
- public void onUnRegister(Clock topClock, Clock bottomClock)
TimingStyle
onUnRegister
in class TimingStyle
topClock
- bottomClock
- public void reset()
OvertimeStyle
reset
in class OvertimeStyle
public int getPeriodsLeft(char clock)
clock
- 't' if we want the periods of the top clock, 'b' if we want the periods of the bottom clock
clock
is not 't' or 'b'public void execute(Clock topClock, Clock bottomClock)
TimingStyle
execute
in class OvertimeStyle
public void execute(Clock tickingClock)
OvertimeStyle
tickingClock
when it
runs out of time to see if it should go into overtime or not
execute
in class OvertimeStyle
tickingClock
- The currently ticking clock which should be checked for overtimepublic java.lang.String toString()
public byte getID()
getID
in interface superwaba.ext.xplat.io.Storable
getID
in class OvertimeStyle
public superwaba.ext.xplat.io.Storable getInstance()
getInstance
in interface superwaba.ext.xplat.io.Storable
getInstance
in class OvertimeStyle
public void saveState(superwaba.ext.xplat.io.DataStream ds)
saveState
in interface superwaba.ext.xplat.io.Storable
saveState
in class OvertimeStyle
public void loadState(superwaba.ext.xplat.io.DataStream ds)
loadState
in interface superwaba.ext.xplat.io.Storable
loadState
in class OvertimeStyle
public java.lang.String getDescription()
TimingStyle
getDescription
in class TimingStyle
protected void evaluate(Clock topClock, Clock bottomClock)
TimingStyle
evaluate
in class OvertimeStyle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |