Interface Timer

All Superinterfaces:
Facet
All Known Implementing Classes:
TimerImpl

@StudioFacet(xmlElement="timer", caption="Timer", description="Fires events at fixed intervals", defaultProperty="id", category="Facets", icon="io/jmix/ui/icon/facet/timer.svg", documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/facets/timer.html") public interface Timer extends Facet
Client-side timer component that fires events at fixed intervals.
  • Field Details

  • Method Details

    • isRepeating

      boolean isRepeating()
      Returns:
      true if timer action is repetitive
    • setRepeating

      @StudioProperty(defaultValue="false") void setRepeating(boolean repeating)
      Sets repetitive mode for timer action.
      Parameters:
      repeating - repeating flag
    • getDelay

      int getDelay()
      Returns:
      delay in milliseconds.
    • setDelay

      @StudioProperty(required=true) @PositiveOrZero void setDelay(int delayMs)
      Parameters:
      delayMs - delay in milliseconds.
    • start

      void start()
      Starts timer. If timer is already started call will be ignored.
    • stop

      void stop()
      Stops timer if it is running.
    • addTimerActionListener

      Subscription addTimerActionListener(Consumer<Timer.TimerActionEvent> listener)
      Adds Timer.TimerActionEvent listener.
      Parameters:
      listener - listener
      Returns:
      subscription
    • addTimerStopListener

      Subscription addTimerStopListener(Consumer<Timer.TimerStopEvent> listener)
      Adds Timer.TimerStopEvent listener.
      Parameters:
      listener - listener
      Returns:
      subscription