Interface ITimer

All Superinterfaces:
IAnyGroup<ITimer>, IComponent<ITimer>, IHtmlBasedComponent<ITimer>

public interface ITimer extends IHtmlBasedComponent<ITimer>, IAnyGroup<ITimer>
Immutable Timer component

Fires one or more Event after a specified delay.

ITimer is a special component that is invisible.

Support @Action

Name Action Type
onTimer Denotes the timer you specified has triggered an action. To know which timer.
Author:
katherine
See Also:
  • Timer
  • Field Details

    • DEFAULT

      static final ITimer DEFAULT
      Constant for default attributes of this immutable component.
  • Method Details

    • getWidgetClass

      default String getWidgetClass()
      Returns the client widget class.

      Default: "zul.utl.Timer"

      Specified by:
      getWidgetClass in interface IComponent<ITimer>
    • isRepeats

      default boolean isRepeats()
      Returns whether the timer shall send Event repeatedly.

      Default: false.

    • withRepeats

      ITimer withRepeats(boolean repeats)
      Returns a copy of this immutable component with the specified repeats.

      Sets whether the timer shall send Event repeatedly.

      Parameters:
      repeats - Whether the timer shall send Event repeatedly.
      Returns:
      A modified copy of this object
    • isRunning

      default boolean isRunning()
      Returns whether this timer is running.

      Default: true.

    • withRunning

      ITimer withRunning(boolean running)
      Returns a copy of this immutable component with the specified running.

      Sets whether this timer is running.

      Parameters:
      running - Whether this timer is running.
      Returns:
      A modified copy of this object
    • getDelay

      default int getDelay()
      Returns the delay, the number of milliseconds between successive action events.

      Default: 0 (immediately).

    • withDelay

      ITimer withDelay(int delay)
      Returns a copy of this immutable component with the specified delay.

      Sets the delay, the number of milliseconds between successive action events.

      Parameters:
      delay - If negative, 0 is assumed.
      Returns:
      A modified copy of this object
    • ofDelay

      static ITimer ofDelay(int delay)
      Returns the instance with the given delay.
      Parameters:
      delay - If negative, 0 is assumed.
    • ofId

      static ITimer ofId(String id)
      Returns the instance with the given id.
      Parameters:
      id - The id to identify this component