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
Modifier and TypeInterfaceDescriptionstatic class
Event fired on timer tick.static class
Event fired on timer stop afterstop()
call. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
addTimerActionListener
(Consumer<Timer.TimerActionEvent> listener) AddsTimer.TimerActionEvent
listener.com.vaadin.flow.shared.Registration
addTimerStopListener
(Consumer<Timer.TimerStopEvent> listener) AddsTimer.TimerStopEvent
listener.int
getDelay()
boolean
boolean
void
setAutostart
(boolean autostart) Sets whether timer should start automatically when added to a viewvoid
setDelay
(int delayMs) void
setRepeating
(boolean repeating) Sets repetitive mode for timer action.void
start()
Starts the timer.void
stop()
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.TimerActionEvent
listener.- Parameters:
listener
-Timer.TimerActionEvent
listener- Returns:
- listener registration
-
addTimerStopListener
AddsTimer.TimerStopEvent
listener.- Parameters:
listener
-Timer.TimerStopEvent
listener- Returns:
- listener registration
-