Class TimerImpl

java.lang.Object
io.jmix.ui.component.impl.AbstractFacet
io.jmix.ui.component.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 timer. If timer is already started call will be ignored.
      Specified by:
      start in interface Timer
    • stop

      public void stop()
      Description copied from interface: Timer
      Stops 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.
    • addTimerActionListener

      public Subscription addTimerActionListener(Consumer<Timer.TimerActionEvent> listener)
      Description copied from interface: Timer
      Adds Timer.TimerActionEvent listener.
      Specified by:
      addTimerActionListener in interface Timer
      Parameters:
      listener - listener
      Returns:
      subscription
    • addTimerStopListener

      public Subscription addTimerStopListener(Consumer<Timer.TimerStopEvent> listener)
      Description copied from interface: Timer
      Adds Timer.TimerStopEvent listener.
      Specified by:
      addTimerStopListener in interface Timer
      Parameters:
      listener - listener
      Returns:
      subscription
    • setId

      public void setId(@Nullable String id)
      Description copied from interface: Facet
      Sets facet ID.
      Specified by:
      setId in interface Facet
      Overrides:
      setId in class AbstractFacet
      Parameters:
      id - id
    • setOwner

      public void setOwner(@Nullable Frame owner)
      Description copied from interface: Facet
      Sets owner frame (Window or Fragment) to the facet.
      Specified by:
      setOwner in interface Facet
      Overrides:
      setOwner in class AbstractFacet
      Parameters:
      owner - owner frame
    • registerInUI

      protected void registerInUI(Frame owner)
    • addDetachListener

      protected void addDetachListener(Frame owner)
    • detachTimerExtension

      protected void detachTimerExtension()
    • registerOnAttach

      protected void registerOnAttach(com.vaadin.ui.Component ownerComponent)
    • attachTimerToUi

      protected void attachTimerToUi(com.vaadin.ui.Component ownerComponent)