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, unsubscribeprotected JmixTimer timerImpl
protected JmixTimer createComponent()
public void start()
Timerpublic void stop()
Timerpublic boolean isRepeating()
isRepeating in interface Timerpublic void setRepeating(boolean repeating)
TimersetRepeating in interface Timerrepeating - repeating flagpublic int getDelay()
public void setDelay(int delay)
public io.jmix.core.common.event.Subscription addTimerActionListener(java.util.function.Consumer<Timer.TimerActionEvent> listener)
TimerTimer.TimerActionEvent listener.addTimerActionListener in interface Timerlistener - listenerpublic io.jmix.core.common.event.Subscription addTimerStopListener(java.util.function.Consumer<Timer.TimerStopEvent> listener)
TimerTimer.TimerStopEvent listener.addTimerStopListener in interface Timerlistener - listenerpublic void setId(@Nullable
java.lang.String id)
FacetsetId in interface FacetsetId in class AbstractFacetid - idpublic void setOwner(@Nullable
Frame owner)
FacetsetOwner in interface FacetsetOwner in class AbstractFacetowner - 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)