Package io.jmix.flowui.facet
Interface Timer
- All Superinterfaces:
Facet
- All Known Implementing Classes:
TimerImpl
Client-side timer component that fires events at fixed intervals.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classEvent fired on timer tick.static classEvent fired on timer stop afterstop()call. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddTimerActionListener(Consumer<Timer.TimerActionEvent> listener) AddsTimer.TimerActionEventlistener.com.vaadin.flow.shared.RegistrationaddTimerStopListener(Consumer<Timer.TimerStopEvent> listener) AddsTimer.TimerStopEventlistener.intgetDelay()booleanbooleanvoidsetAutostart(boolean autostart) Sets whether timer should start automatically when added to a viewvoidsetDelay(int delayMs) voidsetRepeating(boolean repeating) Sets repetitive mode for timer action.voidstart()Starts the timer.voidstop()Stops the timer if it is running.
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
isRepeating
boolean isRepeating()- Returns:
- true if timer action is repetitive
-
setRepeating
void setRepeating(boolean repeating) Sets repetitive mode for timer action.- Parameters:
repeating- repeating flag
-
getDelay
int getDelay()- Returns:
- delay in milliseconds.
-
setDelay
void setDelay(int delayMs) - Parameters:
delayMs- delay in milliseconds.
-
isAutostart
boolean isAutostart()- Returns:
- true if timer starts automatically when added to a view.
-
setAutostart
void setAutostart(boolean autostart) Sets whether timer should start automatically when added to a view- Parameters:
autostart- autostart flag
-
start
void start()Starts the timer. If the timer is already started call will be ignored. -
stop
void stop()Stops the timer if it is running. -
addTimerActionListener
com.vaadin.flow.shared.Registration addTimerActionListener(Consumer<Timer.TimerActionEvent> listener) AddsTimer.TimerActionEventlistener.- Parameters:
listener-Timer.TimerActionEventlistener- Returns:
- listener registration
-
addTimerStopListener
AddsTimer.TimerStopEventlistener.- Parameters:
listener-Timer.TimerStopEventlistener- Returns:
- listener registration
-