|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttempcontroller.base.AbstractTimer
public abstract class AbstractTimer
Implementação auxiliar de um Timer. Controla o tempo decorrido.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface tempcontroller.base.ITimer |
---|
ITimer.Estado |
Constructor Summary | |
---|---|
AbstractTimer()
|
Method Summary | |
---|---|
void |
addOuvinteTimer(IOuvinteTimer ouvinte)
Adiciona um ouvinte do Timer. |
void |
continua()
Retoma a contagem do tempo, depois de um pause. |
protected void |
continuaImpl()
Não faz nada. |
protected void |
fireTempoTotalTerminado()
Notifica todos os ouvintes que o tempo total foi alcançado. |
protected void |
fireTickDoTimer()
Notifica todos os ouvintes com um evento de tick. |
protected long |
getCurrentTime()
Obtém o instante atual do relógio do sistema. |
ITimer.Estado |
getEstado()
Obtém o estado atual do timer. |
long |
getTempoDecorrido()
Obtém o tempo decorrido total. |
long |
getTempoTotal()
Obtém o tempo total deste timer. |
long |
getTick()
Obtém o tick do timer. |
void |
pause()
Pausa a contagem do tempo. |
protected void |
pauseImpl()
Não faz nada. |
void |
removeOuvinteTimer(IOuvinteTimer ouvinte)
Remove um ouvinte do conjunto de ouvintes deste timer. |
void |
setTempoTotal(long tempoTotalLocal)
Define o tempo total deste timer. |
protected void |
setTempoTotalImpl(long tempoTotalLocal)
Não faz nada. |
void |
setTick(long tempo)
Define o tick do timer. |
protected void |
setTickImpl(long tempo)
Não faz nada. |
void |
start()
Inicia a contagem do tempo. |
protected void |
startImpl()
Não faz nada. |
void |
stop()
Termina a contagem do tempo. |
protected void |
stopImpl()
Não faz nada. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTimer()
Method Detail |
---|
public void setTempoTotal(long tempoTotalLocal)
setTempoTotal
in interface ITimer
tempoTotalLocal
- Tempo total do timer.public long getTempoTotal()
getTempoTotal
in interface ITimer
public void setTick(long tempo)
setTick
in interface ITimer
tempo
- Quantidade de tempo do tick.public long getTick()
getTick
in interface ITimer
public void addOuvinteTimer(IOuvinteTimer ouvinte)
addOuvinteTimer
in interface ITimer
ouvinte
- Ouvinte dos eventos deste timer.public void removeOuvinteTimer(IOuvinteTimer ouvinte)
removeOuvinteTimer
in interface ITimer
ouvinte
- Ouvinte que não quer mais receber
eventos deste timer.protected void fireTempoTotalTerminado()
protected void fireTickDoTimer()
public void start()
start
in interface ITimer
public void stop()
stop
in interface ITimer
public void pause()
pause
in interface ITimer
public void continua()
continua
in interface ITimer
public long getTempoDecorrido()
getTempoDecorrido
in interface ITimer
public ITimer.Estado getEstado()
getEstado
in interface ITimer
protected void setTempoTotalImpl(long tempoTotalLocal)
tempoTotalLocal
- Tempo Total do timer.protected void startImpl()
protected void stopImpl()
protected void setTickImpl(long tempo)
tempo
- Quantidade de tempo do tick.protected long getCurrentTime()
System.currentTimeMillis()
protected void pauseImpl()
protected void continuaImpl()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |