Package org.zkoss.stateless.sul

## 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`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static class` | `ITimer.Builder` | Builds instances of type `ITimer`.
    `static class` | `ITimer.Updater` | Builds an updater of type `ITimer` for `UiAgent.smartUpdate(Locator, SmartUpdater)`.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static ITimer` | `DEFAULT` | Constant for default attributes of this immutable component.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `default int` | `getDelay()` | Returns the delay, the number of milliseconds between successive action events.
    `default java.lang.String` | `getWidgetClass()` | Returns the client widget class.
    `default boolean` | `isRepeats()` | Returns whether the timer shall send Event repeatedly.
    `default boolean` | `isRunning()` | Returns whether this timer is running.
    `static ITimer` | `ofDelay​(int delay)` | Returns the instance with the given delay.
    `static ITimer` | `ofId​(java.lang.String id)` | Returns the instance with the given id.
    `ITimer` | `withDelay​(int delay)` | Returns a copy of `this` immutable component with the specified `delay`.
    `ITimer` | `withRepeats​(boolean repeats)` | Returns a copy of `this` immutable component with the specified `repeats`.
    `ITimer` | `withRunning​(boolean running)` | Returns a copy of `this` immutable component with the specified `running`.

    - ### Methods inherited from interface org.zkoss.stateless.sul.IComponent

      `getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides`

    - ### Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent

      `getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex`

- - ### Field Detail

    - #### DEFAULT

          static final ITimer DEFAULT

      Constant for default attributes of this immutable component.

  - ### Method Detail

    - #### getWidgetClass

          default java.lang.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​(java.lang.String id)

      Returns the instance with the given id.
      Parameters:
        `id` - The id to identify this component