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 Summary

    Modifier and Type
    Method
    Description
    child(int nth)
    Returns the first locator that is the nth child of the locator.
    closest(Class<? extends IComponent> selector)
    Traverses the locator and its parents until it finds a widget that matches the provided selector iClass.
    boolean
     
    find(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.
    findChild(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 the first child of the locator on which it is invoked that matches the specified class.
    int
     
    Returns the last child of the locator on which it is invoked that matches the specified class.
    Returns the next sibling of the locator on which it is invoked that matches the specified class.
    Returns the previous sibling of the locator on which it is invoked that matches the specified class.
    org.zkoss.zk.ui.Component
    Converts this locator to ZK Component for Clients API to use.
    org.zkoss.zk.ui.Component
    toComponent(CheckedConsumer2<org.zkoss.zk.ui.event.Event,org.zkoss.zk.ui.ext.Scope> eventHandlers)
    Converts this locator to ZK Component for Events.postEvent(Event) API to use.
    Returns the string representation of a specified locator
     
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • toComponent

      public org.zkoss.zk.ui.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 org.zkoss.zk.ui.Component toComponent(CheckedConsumer2<org.zkoss.zk.ui.event.Event,org.zkoss.zk.ui.ext.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