Package io.jmix.flowui.facet.impl
Class TimerImpl
java.lang.Object
io.jmix.flowui.facet.impl.AbstractFacet
io.jmix.flowui.facet.impl.TimerImpl
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
protected class
Nested classes/interfaces inherited from interface io.jmix.flowui.facet.Timer
Timer.TimerActionEvent, Timer.TimerStopEvent
-
Field Summary
Fields inherited from class io.jmix.flowui.facet.impl.AbstractFacet
id, owner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDetachListener
(View<?> owner) com.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.protected void
attachTimer
(View<?> owner) protected JmixTimer
protected void
detachTimer
(View<?> owner) int
getDelay()
boolean
boolean
protected void
registerInView
(View<?> owner) protected void
registerOnAttach
(View<?> owner) void
setAutostart
(boolean autostart) Sets whether timer should start automatically when added to a viewvoid
setDelay
(int delay) void
void
void
setRepeating
(boolean repeating) Sets repetitive mode for timer action.void
start()
Starts the timer.void
stop()
Stops the timer if it is running.protected void
unregisterInView
(View<?> owner) Methods inherited from class io.jmix.flowui.facet.impl.AbstractFacet
getId, getOwner
-
Field Details
-
timerImpl
-
-
Constructor Details
-
TimerImpl
public TimerImpl()
-
-
Method Details
-
createComponent
-
start
public void start()Description copied from interface:Timer
Starts the timer. If the timer is already started call will be ignored. -
stop
public void stop()Description copied from interface:Timer
Stops the timer if it is running. -
isRepeating
public boolean isRepeating()- Specified by:
isRepeating
in interfaceTimer
- Returns:
- true if timer action is repetitive
-
setRepeating
public void setRepeating(boolean repeating) Description copied from interface:Timer
Sets repetitive mode for timer action.- Specified by:
setRepeating
in interfaceTimer
- Parameters:
repeating
- repeating flag
-
getDelay
public int getDelay() -
setDelay
public void setDelay(int delay) -
isAutostart
public boolean isAutostart()- Specified by:
isAutostart
in interfaceTimer
- Returns:
- true if timer starts automatically when added to a view.
-
setAutostart
public void setAutostart(boolean autostart) Description copied from interface:Timer
Sets whether timer should start automatically when added to a view- Specified by:
setAutostart
in interfaceTimer
- Parameters:
autostart
- autostart flag
-
addTimerActionListener
public com.vaadin.flow.shared.Registration addTimerActionListener(Consumer<Timer.TimerActionEvent> listener) Description copied from interface:Timer
AddsTimer.TimerActionEvent
listener.- Specified by:
addTimerActionListener
in interfaceTimer
- Parameters:
listener
-Timer.TimerActionEvent
listener- Returns:
- listener registration
-
addTimerStopListener
public com.vaadin.flow.shared.Registration addTimerStopListener(Consumer<Timer.TimerStopEvent> listener) Description copied from interface:Timer
AddsTimer.TimerStopEvent
listener.- Specified by:
addTimerStopListener
in interfaceTimer
- Parameters:
listener
-Timer.TimerStopEvent
listener- Returns:
- listener registration
-
setId
- Specified by:
setId
in interfaceFacet
- Overrides:
setId
in classAbstractFacet
-
setOwner
- Specified by:
setOwner
in interfaceFacet
- Overrides:
setOwner
in classAbstractFacet
-
registerInView
-
attachTimer
-
registerOnAttach
-
addDetachListener
-
detachTimer
-
unregisterInView
-