public class TimerImpl extends AbstractFacet implements Timer
Modifier and Type | Class and Description |
---|---|
protected class |
TimerImpl.JmixTimerActionListenerWrapper |
protected class |
TimerImpl.JmixTimerStopListenerWrapper |
Timer.TimerActionEvent, Timer.TimerStopEvent
Modifier and Type | Field and Description |
---|---|
protected JmixTimer |
timerImpl |
id, owner
Constructor and Description |
---|
TimerImpl() |
Modifier and Type | Method and Description |
---|---|
io.jmix.core.common.event.Subscription |
addTimerActionListener(java.util.function.Consumer<Timer.TimerActionEvent> listener)
Adds
Timer.TimerActionEvent listener. |
io.jmix.core.common.event.Subscription |
addTimerStopListener(java.util.function.Consumer<Timer.TimerStopEvent> listener)
Adds
Timer.TimerStopEvent listener. |
protected void |
attachTimerToUi(com.vaadin.ui.Component ownerComponent) |
protected JmixTimer |
createComponent() |
protected void |
detachTimerExtension() |
int |
getDelay() |
boolean |
isRepeating() |
protected void |
registerInUI(Frame owner) |
protected void |
registerOnAttach(com.vaadin.ui.Component ownerComponent) |
void |
setDelay(int delay) |
void |
setId(java.lang.String id)
Sets facet ID.
|
void |
setOwner(Frame owner)
|
void |
setRepeating(boolean repeating)
Sets repetitive mode for timer action.
|
void |
start()
Starts timer.
|
void |
stop()
Stops timer if it is running.
|
getEventHub, getId, getOwner, hasSubscriptions, publish, unsubscribe
protected JmixTimer timerImpl
protected JmixTimer createComponent()
public void start()
Timer
public void stop()
Timer
public boolean isRepeating()
isRepeating
in interface Timer
public void setRepeating(boolean repeating)
Timer
setRepeating
in interface Timer
repeating
- repeating flagpublic int getDelay()
public void setDelay(int delay)
public io.jmix.core.common.event.Subscription addTimerActionListener(java.util.function.Consumer<Timer.TimerActionEvent> listener)
Timer
Timer.TimerActionEvent
listener.addTimerActionListener
in interface Timer
listener
- listenerpublic io.jmix.core.common.event.Subscription addTimerStopListener(java.util.function.Consumer<Timer.TimerStopEvent> listener)
Timer
Timer.TimerStopEvent
listener.addTimerStopListener
in interface Timer
listener
- listenerpublic void setId(@Nullable java.lang.String id)
Facet
setId
in interface Facet
setId
in class AbstractFacet
id
- idpublic void setOwner(@Nullable Frame owner)
Facet
setOwner
in interface Facet
setOwner
in class AbstractFacet
owner
- owner frameprotected void registerInUI(Frame owner)
protected void detachTimerExtension()
protected void registerOnAttach(com.vaadin.ui.Component ownerComponent)
protected void attachTimerToUi(com.vaadin.ui.Component ownerComponent)