Package org.zkoss.zats.mimic
Interface ComponentAgent
- All Superinterfaces:
Agent,QueryAgent
- All Known Implementing Classes:
DefaultComponentAgent
The component agent, wraps a server-side zk component.
- Author:
- pao, henrichen
-
Method Summary
Modifier and TypeMethodDescriptionvoidblur()Blur this component, it is a short cut ofFocusAgent.blur()voidcheck(boolean checked) Check this component, it is a short cut ofCheckAgent.check(boolean)voidclick()Click on this component, A short cut ofClickAgent.click()voidfocus()Focus this component, it is a short cut ofFocusAgent.focus()getAttribute(String name) get attribute by specify name.getChild(int index) get child by specify index.get children agents.get desktop agent this component belonged to.Returns the first child, if any.getId()get ID.Returns the last child, if any.Returns the next sibling, if any.<T extends org.zkoss.zk.ui.Component>
TgetOwner()Returns the associated owner component of this agentgetPage()get page agent this component belonged to.get parent agent.Returns the previous sibling, if any.getUuid()get UUID.voidInput to this component, it is a short cut ofInputAgent.input(Object)voidselect()Select this component, it is a short cut ofSelectAgent.select()voidStroke a key on this component, it is a short cut ofKeyStrokeAgent.stroke(String)voidType on this component, it is a short cut ofInputAgent.type(String)Methods inherited from interface org.zkoss.zats.mimic.Agent
getClient, getDelegateeMethods inherited from interface org.zkoss.zats.mimic.QueryAgent
as, is, query, queryAll
-
Method Details
-
getId
String getId()get ID. of the component.- Returns:
- ID or null if it hasn't.
-
getUuid
String getUuid()get UUID. of the component.- Returns:
- UUID.
-
getAttribute
get attribute by specify name.- Parameters:
name- attribute name.- Returns:
- attribute value or null if not found or otherwise.
-
getChildren
List<ComponentAgent> getChildren()get children agents.- Returns:
- always return a list of children (may be empty).
-
getChild
get child by specify index.- Parameters:
index-- Returns:
- child agent or null if index is out of boundary.
-
getOwner
<T extends org.zkoss.zk.ui.Component> T getOwner()Returns the associated owner component of this agent- Returns:
-
getFirstChild
ComponentAgent getFirstChild()Returns the first child, if any.- Returns:
- the first child agent or null.
- Since:
- 1.2.1
-
getLastChild
ComponentAgent getLastChild()Returns the last child, if any.- Returns:
- the last child agent or null.
- Since:
- 1.2.1
-
getNextSibling
ComponentAgent getNextSibling()Returns the next sibling, if any.- Returns:
- the next sibling agent or null.
- Since:
- 1.2.1
-
getPreviousSibling
ComponentAgent getPreviousSibling()Returns the previous sibling, if any.- Returns:
- the previous sibling agent or null.
- Since:
- 1.2.1
-
getParent
ComponentAgent getParent()get parent agent.- Returns:
- parent agent or null if this is root agent.
-
getDesktop
DesktopAgent getDesktop()get desktop agent this component belonged to.- Returns:
- desktop agent.
-
getPage
PageAgent getPage()get page agent this component belonged to.- Returns:
- page agent.
-
click
void click()Click on this component, A short cut ofClickAgent.click()If this component doesn't supportClickAgent, it will throw exception.- See Also:
-
type
Type on this component, it is a short cut ofInputAgent.type(String)If this component doesn't supportInputAgent, it will throw exception.- See Also:
-
input
Input to this component, it is a short cut ofInputAgent.input(Object)If this component doesn't supportInputAgent, it will throw exception.- See Also:
-
focus
void focus()Focus this component, it is a short cut ofFocusAgent.focus()If this component doesn't supportFocusAgent, it will throw exception.- See Also:
-
blur
void blur()Blur this component, it is a short cut ofFocusAgent.blur()If this component doesn't supportFocusAgent, it will throw exception.- See Also:
-
check
void check(boolean checked) Check this component, it is a short cut ofCheckAgent.check(boolean)If this component doesn't supportCheckAgent, it will throw exception.- See Also:
-
stroke
Stroke a key on this component, it is a short cut ofKeyStrokeAgent.stroke(String)If this component doesn't supportKeyStrokeAgent, it will throw exception.- See Also:
-
select
void select()Select this component, it is a short cut ofSelectAgent.select()If this component doesn't supportSelectAgent, it will throw exception.- See Also:
-