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 Locatorchild(int nth)Returns the first locator that is the nth child of the locator.Locatorclosest(java.lang.Class<? extends IComponent> selector)Traverses the locator and its parents until it finds a widget that matches the provided selector iClass.booleanequals(java.lang.Object o)Locatorfind(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.LocatorfindChild(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.LocatorfirstChild()Returns the first child of the locator on which it is invoked that matches the specified class.inthashCode()LocatorlastChild()Returns the last child of the locator on which it is invoked that matches the specified class.LocatornextSibling()Returns the next sibling of the locator on which it is invoked that matches the specified class.LocatorpreviousSibling()Returns the previous sibling of the locator on which it is invoked that matches the specified class.org.zkoss.zk.ui.ComponenttoComponent()Converts this locator to ZK Component forClientsAPI to use.org.zkoss.zk.ui.ComponenttoComponent(CheckedConsumer2<org.zkoss.zk.ui.event.Event,org.zkoss.zk.ui.ext.Scope> eventHandlers)Converts this locator to ZK Component forEvents.postEvent(Event)API to use.java.lang.StringtoExternalForm()Returns the string representation of a specified locatorjava.lang.StringtoIdIfAny()java.lang.StringtoString()java.lang.StringtoUuidIfAny()
-
-
-
Method Detail
-
toComponent
public org.zkoss.zk.ui.Component toComponent()
Description copied from interface:LocatorConverts this locator to ZK Component forClientsAPI to use.- Specified by:
toComponentin interfaceLocator- 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:LocatorConverts this locator to ZK Component forEvents.postEvent(Event)API to use.- Specified by:
toComponentin interfaceLocator
-
toExternalForm
public java.lang.String toExternalForm()
Description copied from interface:LocatorReturns the string representation of a specified locator- Specified by:
toExternalFormin 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:LocatorReturns 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:LocatorReturns 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:LocatorReturns the first locator that is the nth child of the locator.
-
previousSibling
public Locator previousSibling()
Description copied from interface:LocatorReturns the previous sibling of the locator on which it is invoked that matches the specified class.- Specified by:
previousSiblingin interfaceLocator- Returns:
-
nextSibling
public Locator nextSibling()
Description copied from interface:LocatorReturns the next sibling of the locator on which it is invoked that matches the specified class.- Specified by:
nextSiblingin interfaceLocator- Returns:
-
firstChild
public Locator firstChild()
Description copied from interface:LocatorReturns the first child of the locator on which it is invoked that matches the specified class.- Specified by:
firstChildin interfaceLocator- Returns:
-
lastChild
public Locator lastChild()
Description copied from interface:LocatorReturns 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:LocatorTraverses 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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-