|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sale.StepTimer sale.AutoTimer
public class AutoTimer
A timer that has the functionality of the StepTimer
and additionally
can increase the time automatically.
Field Summary |
---|
Fields inherited from class sale.StepTimer |
---|
m_lhListeners, m_tTime |
Constructor Summary | |
---|---|
AutoTimer()
Create a new AutoTimer with a Step as time object and a delay of 10 seconds. |
|
AutoTimer(Time tTime)
Create a new AutoTimer with the given time object and a delay of 10 seconds. |
|
AutoTimer(Time tTime,
long lDelay)
Create a new AutoTimer with the given time object and delay. |
Method Summary | |
---|---|
long |
getDelay()
Get the current delay between timer ticks in milliseconds. |
void |
goAhead()
Increase the time by the current interval. |
void |
setDelay(long lMilliSecs)
Set the delay between timer ticks. |
void |
start()
Set the timer running. |
void |
stop()
Stop the timer. |
Methods inherited from class sale.StepTimer |
---|
addTimerListener, fireGoneAhead, fireIntervalSet, fireTimeSet, getInterval, getTime, getTimeObject, getTimeStamp, removeTimerListener, setInterval, setTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AutoTimer()
Step
as time object and a delay of 10 seconds.
The timer is initially not running.
public AutoTimer(Time tTime)
tTime
- the time object to be usedpublic AutoTimer(Time tTime, long lDelay)
tTime
- the time object to uselDelay
- the delay in milliseconds between the increasing stepsMethod Detail |
---|
public void goAhead() throws IllegalArgumentException
If no interval has yet been set, the interval given by the Time.getDefaultInterval()
method
of the time object is used.
If the AutoTimer is running, the time is increased and the delay restartet.
goAhead
in interface Timer
goAhead
in class StepTimer
IllegalArgumentException
- if the interval does not meet the time object's class or format
requirements.TimerListener.onGoneAhead(sale.events.TimerEvent)
public void start() throws IllegalArgumentException
The first timer tick occurs at once.
IllegalArgumentException
public void stop()
public void setDelay(long lMilliSecs)
If the AutoTimer is currently running, the new delay takes effect after the next tick.
lMilliSecs
- the delay in milliseconds. Must be > 0.public long getDelay()
|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |