Package org.zkoss.stateless.ui

## Interface Locator

- All Known Implementing Classes:
    `Self`

      public interface Locator

  An interface to indicate an opaque reference to the location information of `IComponent`s at client side.
  Author:
    jumperchen

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Locator` | `child​(int nth)` | Returns the first locator that is the nth child of the locator.
    `Locator` | `closest​(java.lang.Class<? extends IComponent> iClass)` | Traverses the locator and its parents until it finds a widget that matches the provided selector iClass.
    `Locator` | `find​(java.lang.Class<? extends IComponent> selector)` | Returns the first locator that is a descendant of the locator on which it is invoked that matches the specified class.
    `Locator` | `findChild​(java.lang.Class<? extends IComponent> selector)` | Returns the first locator that is a direct child of the locator on which it is invoked that matches the specified class.
    `Locator` | `firstChild()` | Returns the first child of the locator on which it is invoked that matches the specified class.
    `Locator` | `lastChild()` | Returns the last child of the locator on which it is invoked that matches the specified class.
    `Locator` | `nextSibling()` | Returns the next sibling of the locator on which it is invoked that matches the specified class.
    `static <I extends IComponent> Locator` | `of​(I iComponent)` | Returns a locator to the given `IComponent`.
    `static <T extends Component> Locator` | `of​(java.lang.String uuid)` | Returns a locator to the given uuid.
    `static <T extends Component> Locator` | `of​(T component)` | Returns a locator to the given `Component`.
    `static <T extends Component> Locator` | `ofId​(java.lang.String id)` | Returns a locator to the given id of `IComponent`.
    `Locator` | `previousSibling()` | Returns the previous sibling of the locator on which it is invoked that matches the specified class.
    `Component` | `toComponent()` | Converts this locator to ZK Component for `Clients` API to use.
    `Component` | `toComponent​(CheckedConsumer2<Event,​Scope> eventHandlers)` | Converts this locator to ZK Component for `Events.postEvent(Event)` API to use.
    `java.lang.String` | `toExternalForm()` | Returns the string representation of a specified locator

- - ### Method Detail

    - #### closest

          Locator closest​(java.lang.Class<? extends IComponent> iClass)

      Traverses the locator and its parents until it finds a widget that matches the provided selector iClass. Will return the locator of itself or the matching ancestor. If no such widget exists, it means nothing.
      Returns:

    - #### toComponent

          Component toComponent()

      Converts this locator to ZK Component for `Clients` API to use.
      Returns:

    - #### toComponent

          Component toComponent​(CheckedConsumer2<Event,​Scope> eventHandlers)

      Converts this locator to ZK Component for `Events.postEvent(Event)` API to use.

    - #### toExternalForm

          java.lang.String toExternalForm()

      Returns the string representation of a specified locator

    - #### find

          Locator find​(java.lang.Class<? extends IComponent> selector)

      Returns the first locator that is a descendant of the locator on which it is invoked that matches the specified class.
      Returns:

    - #### findChild

          Locator findChild​(java.lang.Class<? extends IComponent> selector)

      Returns the first locator that is a direct child of the locator on which it is invoked that matches the specified class.
      Returns:

    - #### child

          Locator child​(int nth)

      Returns the first locator that is the nth child of the locator.
      Parameters:
        `nth` - 0-based
      Returns:

    - #### previousSibling

          Locator previousSibling()

      Returns the previous sibling of the locator on which it is invoked that matches the specified class.
      Returns:

    - #### nextSibling

          Locator nextSibling()

      Returns the next sibling of the locator on which it is invoked that matches the specified class.
      Returns:

    - #### firstChild

          Locator firstChild()

      Returns the first child of the locator on which it is invoked that matches the specified class.
      Returns:

    - #### lastChild

          Locator lastChild()

      Returns the last child of the locator on which it is invoked that matches the specified class.
      Returns:

    - #### of

          static <I extends IComponent> Locator of​(I iComponent)

      Returns a locator to the given `IComponent`. Note: The id of the component cannot be null.
      Returns:

    - #### of

          static <T extends Component> Locator of​(T component)

      Returns a locator to the given `Component`. Note: The uuid of the component cannot be null.
      Returns:

    - #### of

          static <T extends Component> Locator of​(java.lang.String uuid)

      Returns a locator to the given uuid. Note: The uuid cannot be null.
      Returns:

    - #### ofId

          static <T extends Component> Locator ofId​(java.lang.String id)

      Returns a locator to the given id of `IComponent`. Note: The id cannot be null.
      Returns: