public class DefaultPageAgent extends java.lang.Object implements PageAgent
Constructor and Description |
---|
DefaultPageAgent(DesktopAgent desktopAgent,
org.zkoss.zk.ui.Page page) |
Modifier and Type | Method and Description |
---|---|
<T> T |
as(java.lang.Class<T> clazz)
Try to get a instance of target class for this query agent, the target class
is usually a
OperationAgent or a native Component if it cannot get a instance of target class, it will throw AgentException . |
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
getAttribute(java.lang.String name)
get attribute by specify name.
|
Client |
getClient()
get client this agent belonged to.
|
java.lang.Object |
getDelegatee()
get the delegatee object
|
DesktopAgent |
getDesktop()
get desktop of this page
|
java.lang.String |
getId()
get ID.
|
org.zkoss.zk.ui.Page |
getPage() |
java.util.List<ComponentAgent> |
getRoots()
get root component agents at the page.
|
java.lang.String |
getType() |
java.lang.String |
getUuid()
get UUID.
|
int |
hashCode() |
<T> boolean |
is(java.lang.Class<T> clazz)
Can get a instance of target class for this query agent.
|
ComponentAgent |
query(java.lang.String selector)
to find the first component agent with the selector in this query agent.
|
java.util.List<ComponentAgent> |
queryAll(java.lang.String selector)
to find the component agents with the selector in this query agent.
|
java.lang.String |
toString() |
public DefaultPageAgent(DesktopAgent desktopAgent, org.zkoss.zk.ui.Page page)
public java.lang.String getId()
PageAgent
public java.lang.String getType()
public java.lang.Object getAttribute(java.lang.String name)
PageAgent
getAttribute
in interface PageAgent
name
- attribute name.public java.lang.String getUuid()
PageAgent
public java.util.List<ComponentAgent> getRoots()
PageAgent
public Client getClient()
Agent
public DesktopAgent getDesktop()
PageAgent
getDesktop
in interface PageAgent
public org.zkoss.zk.ui.Page getPage()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.Object getDelegatee()
Agent
getDelegatee
in interface Agent
public ComponentAgent query(java.lang.String selector)
QueryAgent
query
in interface QueryAgent
selector
- the selectorpublic java.util.List<ComponentAgent> queryAll(java.lang.String selector)
QueryAgent
queryAll
in interface QueryAgent
selector
- the selectorpublic java.lang.String toString()
toString
in class java.lang.Object
public <T> T as(java.lang.Class<T> clazz)
QueryAgent
OperationAgent
or a native Component
AgentException
.as
in interface QueryAgent
clazz
- class of specify operation.public <T> boolean is(java.lang.Class<T> clazz)
QueryAgent
is
in interface QueryAgent
clazz
- the class cast to.Copyright © 2019 Potix Corporation. All rights reserved.