Class Self

java.lang.Object
org.zkoss.stateless.ui.Self
All Implemented Interfaces:
Locator

public final class Self extends Object implements Locator
A target to locate a location at client for IComponent
Author:
jumperchen
  • Method Details

    • toComponent

      public Component toComponent()
      Description copied from interface: Locator
      Converts this locator to ZK Component for Clients API to use.
      Specified by:
      toComponent in interface Locator
      Returns:
    • toComponent

      public Component toComponent(CheckedConsumer2<Event,Scope> eventHandlers)
      Description copied from interface: Locator
      Converts this locator to ZK Component for Events.postEvent(Event) API to use.
      Specified by:
      toComponent in interface Locator
    • toExternalForm

      public String toExternalForm()
      Description copied from interface: Locator
      Returns the string representation of a specified locator
      Specified by:
      toExternalForm in interface Locator
    • toUuidIfAny

      public String toUuidIfAny()
    • toIdIfAny

      public String toIdIfAny()
    • find

      public Locator find(Class<? extends IComponent> selector)
      Description copied from interface: Locator
      Returns the first locator that is a descendant of the locator on which it is invoked that matches the specified class.
      Specified by:
      find in interface Locator
      Returns:
    • findChild

      public Locator findChild(Class<? extends IComponent> selector)
      Description copied from interface: Locator
      Returns the first locator that is a direct child of the locator on which it is invoked that matches the specified class.
      Specified by:
      findChild in interface Locator
      Returns:
    • child

      public Locator child(int nth)
      Description copied from interface: Locator
      Returns the first locator that is the nth child of the locator.
      Specified by:
      child in interface Locator
      Parameters:
      nth - 0-based
      Returns:
    • previousSibling

      public Locator previousSibling()
      Description copied from interface: Locator
      Returns the previous sibling of the locator on which it is invoked that matches the specified class.
      Specified by:
      previousSibling in interface Locator
      Returns:
    • nextSibling

      public Locator nextSibling()
      Description copied from interface: Locator
      Returns the next sibling of the locator on which it is invoked that matches the specified class.
      Specified by:
      nextSibling in interface Locator
      Returns:
    • firstChild

      public Locator firstChild()
      Description copied from interface: Locator
      Returns the first child of the locator on which it is invoked that matches the specified class.
      Specified by:
      firstChild in interface Locator
      Returns:
    • lastChild

      public Locator lastChild()
      Description copied from interface: Locator
      Returns the last child of the locator on which it is invoked that matches the specified class.
      Specified by:
      lastChild in interface Locator
      Returns:
    • closest

      public Locator closest(Class<? extends IComponent> selector)
      Description copied from interface: Locator
      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.
      Specified by:
      closest in interface Locator
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object