Class TimerImpl

java.lang.Object
io.jmix.flowui.facet.impl.AbstractFacet
io.jmix.flowui.facet.impl.TimerImpl
All Implemented Interfaces:
Facet, Timer

public class TimerImpl extends AbstractFacet implements Timer
  • Field Details

  • Constructor Details

    • TimerImpl

      public TimerImpl()
  • Method Details

    • createComponent

      protected JmixTimer createComponent()
    • start

      public void start()
      Description copied from interface: Timer
      Starts the timer. If the timer is already started call will be ignored.
      Specified by:
      start in interface Timer
    • stop

      public void stop()
      Description copied from interface: Timer
      Stops the timer if it is running.
      Specified by:
      stop in interface Timer
    • isRepeating

      public boolean isRepeating()
      Specified by:
      isRepeating in interface Timer
      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 interface Timer
      Parameters:
      repeating - repeating flag
    • getDelay

      public int getDelay()
      Specified by:
      getDelay in interface Timer
      Returns:
      delay in milliseconds.
    • setDelay

      public void setDelay(int delay)
      Specified by:
      setDelay in interface Timer
      Parameters:
      delay - delay in milliseconds.
    • isAutostart

      public boolean isAutostart()
      Specified by:
      isAutostart in interface Timer
      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 interface Timer
      Parameters:
      autostart - autostart flag
    • addTimerActionListener

      public com.vaadin.flow.shared.Registration addTimerActionListener(Consumer<Timer.TimerActionEvent> listener)
      Description copied from interface: Timer
      Adds Timer.TimerActionEvent listener.
      Specified by:
      addTimerActionListener in interface Timer
      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
      Adds Timer.TimerStopEvent listener.
      Specified by:
      addTimerStopListener in interface Timer
      Parameters:
      listener - Timer.TimerStopEvent listener
      Returns:
      listener registration
    • setId

      public void setId(@Nullable String id)
      Specified by:
      setId in interface Facet
      Overrides:
      setId in class AbstractFacet
    • setOwner

      public void setOwner(@Nullable View<?> owner)
      Specified by:
      setOwner in interface Facet
      Overrides:
      setOwner in class AbstractFacet
    • registerInView

      protected void registerInView(View<?> owner)
    • attachTimer

      protected void attachTimer(View<?> owner)
    • registerOnAttach

      protected void registerOnAttach(View<?> owner)
    • addDetachListener

      protected void addDetachListener(View<?> owner)
    • detachTimer

      protected void detachTimer(View<?> owner)
    • unregisterInView

      protected void unregisterInView(View<?> owner)