Package org.zkoss.stateless.ui
Class Self
- java.lang.Object
-
- org.zkoss.stateless.ui.Self
-
- All Implemented Interfaces:
Locator
public final class Self extends java.lang.Object implements Locator
A target to locate a location at client forIComponent
- 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 forClients
API to use.Component
toComponent(CheckedConsumer2<Event,Scope> eventHandlers)
Converts this locator to ZK Component forEvents.postEvent(Event)
API to use.java.lang.String
toExternalForm()
Returns the string representation of a specified locatorjava.lang.String
toIdIfAny()
java.lang.String
toString()
java.lang.String
toUuidIfAny()
-
-
-
Method Detail
-
toComponent
public Component toComponent()
Description copied from interface:Locator
Converts this locator to ZK Component forClients
API to use.- Specified by:
toComponent
in interfaceLocator
- Returns:
-
toComponent
public Component toComponent(CheckedConsumer2<Event,Scope> eventHandlers)
Description copied from interface:Locator
Converts this locator to ZK Component forEvents.postEvent(Event)
API to use.- Specified by:
toComponent
in interfaceLocator
-
toExternalForm
public java.lang.String toExternalForm()
Description copied from interface:Locator
Returns the string representation of a specified locator- Specified by:
toExternalForm
in interfaceLocator
-
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.
-
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.
-
child
public Locator child(int nth)
Description copied from interface:Locator
Returns the first locator that is the nth child of the locator.
-
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 interfaceLocator
- 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 interfaceLocator
- 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 interfaceLocator
- 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.
-
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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-