Class Self

  • All Implemented Interfaces:
    Locator

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

      All Methods Instance Methods Concrete 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> selector)
      Traverses the locator and its parents until it finds a widget that matches the provided selector iClass.
      boolean equals​(java.lang.Object o)  
      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.
      int hashCode()  
      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.
      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
      java.lang.String toIdIfAny()  
      java.lang.String toString()  
      java.lang.String toUuidIfAny()  
      • Methods inherited from class java.lang.Object

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

      • 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:
      • toExternalForm

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

        public java.lang.String toUuidIfAny()
      • toIdIfAny

        public java.lang.String toIdIfAny()
      • find

        public Locator find​(java.lang.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​(java.lang.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​(java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object