Package org.zkoss.zats.mimic
Interface ComponentAgent
-
- All Superinterfaces:
Agent,QueryAgent
- All Known Implementing Classes:
DefaultComponentAgent
public interface ComponentAgent extends QueryAgent
The component agent, wraps a server-side zk component.- Author:
- pao, henrichen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidblur()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()ObjectgetAttribute(String name)get attribute by specify name.ComponentAgentgetChild(int index)get child by specify index.List<ComponentAgent>getChildren()get children agents.DesktopAgentgetDesktop()get desktop agent this component belonged to.ComponentAgentgetFirstChild()Returns the first child, if any.StringgetId()get ID.ComponentAgentgetLastChild()Returns the last child, if any.ComponentAgentgetNextSibling()Returns the next sibling, if any.<T extends org.zkoss.zk.ui.Component>
TgetOwner()Returns the associated owner component of this agentPageAgentgetPage()get page agent this component belonged to.ComponentAgentgetParent()get parent agent.ComponentAgentgetPreviousSibling()Returns the previous sibling, if any.StringgetUuid()get UUID.voidinput(Object value)Input to this component, it is a short cut ofInputAgent.input(Object)voidselect()Select this component, it is a short cut ofSelectAgent.select()voidstroke(String key)Stroke a key on this component, it is a short cut ofKeyStrokeAgent.stroke(String)voidtype(String value)Type on this component, it is a short cut ofInputAgent.type(String)-
Methods inherited from interface org.zkoss.zats.mimic.Agent
getClient, getDelegatee
-
Methods inherited from interface org.zkoss.zats.mimic.QueryAgent
as, is, query, queryAll
-
-
-
-
Method Detail
-
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
Object getAttribute(String name)
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
ComponentAgent getChild(int index)
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:
QueryAgent.as(Class),ClickAgent
-
type
void type(String value)
Type on this component, it is a short cut ofInputAgent.type(String)If this component doesn't supportInputAgent, it will throw exception.- See Also:
QueryAgent.as(Class),InputAgent
-
input
void input(Object value)
Input to this component, it is a short cut ofInputAgent.input(Object)If this component doesn't supportInputAgent, it will throw exception.- See Also:
QueryAgent.as(Class),InputAgent
-
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:
QueryAgent.as(Class),FocusAgent
-
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:
QueryAgent.as(Class),FocusAgent
-
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:
QueryAgent.as(Class),CheckAgent
-
stroke
void stroke(String key)
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:
QueryAgent.as(Class),KeyStrokeAgent
-
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:
QueryAgent.as(Class),SelectAgent
-
-