net.thestump.ghronos.timing.delay
Class DelayStyle

java.lang.Object
  extended bynet.thestump.ghronos.timing.TimingStyle
      extended bynet.thestump.ghronos.timing.delay.DelayStyle
All Implemented Interfaces:
superwaba.ext.xplat.io.Storable
Direct Known Subclasses:
Delay, Fischer

public abstract class DelayStyle
extends TimingStyle

Base class for delay-oriented timing styles

Author:
Christopher C. Stump

Field Summary
protected  byte[] delay
           
 
Fields inherited from class net.thestump.ghronos.timing.TimingStyle
appliedToBottomClock, appliedToTopClock, toStart, toStop
 
Constructor Summary
DelayStyle()
           
 
Method Summary
abstract  void execute(Clock topClock, Clock bottomClock)
          Applies the timing style to the appropriate clocks on a clock switch
 byte[] getDelay()
          Returns an array of the current delay.
abstract  byte getID()
           
abstract  superwaba.ext.xplat.io.Storable getInstance()
           
 void loadState(superwaba.ext.xplat.io.DataStream ds)
           
 void saveState(superwaba.ext.xplat.io.DataStream ds)
           
 void setDelay(byte[] del)
          Sets the delay to the time given in the array.
 
Methods inherited from class net.thestump.ghronos.timing.TimingStyle
applyTo, evaluate, getDescription, isAppliedTo, onRegister, onUnRegister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delay

protected byte[] delay
Constructor Detail

DelayStyle

public DelayStyle()
Method Detail

getDelay

public byte[] getDelay()
Returns an array of the current delay. Array index[0] is the first hour digit, index[2] is the first minute digit, etc.

Returns:
An array of length 6 with the current delay

setDelay

public void setDelay(byte[] del)
Sets the delay to the time given in the array. Array index[0] is the first hour digit, index[2] is the first minute digit, etc.

Parameters:
del - The time to be set
Throws:
BadArgumentException - If del is not of length 6

execute

public abstract void execute(Clock topClock,
                             Clock bottomClock)
Description copied from class: TimingStyle
Applies the timing style to the appropriate clocks on a clock switch

Specified by:
execute in class TimingStyle
Parameters:
topClock - The application's top clock
bottomClock - The application's bottom clock

getID

public abstract byte getID()
Specified by:
getID in interface superwaba.ext.xplat.io.Storable
Specified by:
getID in class TimingStyle

getInstance

public abstract superwaba.ext.xplat.io.Storable getInstance()
Specified by:
getInstance in interface superwaba.ext.xplat.io.Storable
Specified by:
getInstance in class TimingStyle

saveState

public void saveState(superwaba.ext.xplat.io.DataStream ds)
Specified by:
saveState in interface superwaba.ext.xplat.io.Storable
Overrides:
saveState in class TimingStyle

loadState

public void loadState(superwaba.ext.xplat.io.DataStream ds)
Specified by:
loadState in interface superwaba.ext.xplat.io.Storable
Overrides:
loadState in class TimingStyle


Copyright © 2004 Christopher C. Stump. All Rights Reserved.