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
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classNested classes/interfaces inherited from interface io.jmix.flowui.facet.Timer
Timer.TimerActionEvent, Timer.TimerStopEvent -
Field Summary
FieldsFields inherited from class io.jmix.flowui.facet.impl.AbstractFacet
id, owner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDetachListener(View<?> owner) com.vaadin.flow.shared.RegistrationaddTimerActionListener(Consumer<Timer.TimerActionEvent> listener) AddsTimer.TimerActionEventlistener.com.vaadin.flow.shared.RegistrationaddTimerStopListener(Consumer<Timer.TimerStopEvent> listener) AddsTimer.TimerStopEventlistener.protected voidattachTimer(View<?> owner) protected JmixTimerprotected voiddetachTimer(View<?> owner) intgetDelay()booleanbooleanprotected voidregisterInView(View<?> owner) protected voidregisterOnAttach(View<?> owner) voidsetAutostart(boolean autostart) Sets whether timer should start automatically when added to a viewvoidsetDelay(int delay) voidvoidvoidsetRepeating(boolean repeating) Sets repetitive mode for timer action.voidstart()Starts the timer.voidstop()Stops the timer if it is running.protected voidunregisterInView(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:TimerStarts the timer. If the timer is already started call will be ignored. -
stop
public void stop()Description copied from interface:TimerStops the timer if it is running. -
isRepeating
public boolean isRepeating()- Specified by:
isRepeatingin interfaceTimer- Returns:
- true if timer action is repetitive
-
setRepeating
public void setRepeating(boolean repeating) Description copied from interface:TimerSets repetitive mode for timer action.- Specified by:
setRepeatingin interfaceTimer- Parameters:
repeating- repeating flag
-
getDelay
public int getDelay() -
setDelay
public void setDelay(int delay) -
isAutostart
public boolean isAutostart()- Specified by:
isAutostartin interfaceTimer- Returns:
- true if timer starts automatically when added to a view.
-
setAutostart
public void setAutostart(boolean autostart) Description copied from interface:TimerSets whether timer should start automatically when added to a view- Specified by:
setAutostartin interfaceTimer- Parameters:
autostart- autostart flag
-
addTimerActionListener
public com.vaadin.flow.shared.Registration addTimerActionListener(Consumer<Timer.TimerActionEvent> listener) Description copied from interface:TimerAddsTimer.TimerActionEventlistener.- Specified by:
addTimerActionListenerin interfaceTimer- Parameters:
listener-Timer.TimerActionEventlistener- Returns:
- listener registration
-
addTimerStopListener
public com.vaadin.flow.shared.Registration addTimerStopListener(Consumer<Timer.TimerStopEvent> listener) Description copied from interface:TimerAddsTimer.TimerStopEventlistener.- Specified by:
addTimerStopListenerin interfaceTimer- Parameters:
listener-Timer.TimerStopEventlistener- Returns:
- listener registration
-
setId
- Specified by:
setIdin interfaceFacet- Overrides:
setIdin classAbstractFacet
-
setOwner
- Specified by:
setOwnerin interfaceFacet- Overrides:
setOwnerin classAbstractFacet
-
registerInView
-
attachTimer
-
registerOnAttach
-
addDetachListener
-
detachTimer
-
unregisterInView
-