public class DefaultDesktopAgent extends java.lang.Object implements DesktopAgent, DesktopCtrl
Constructor and Description |
---|
DefaultDesktopAgent(Client client,
org.zkoss.zk.ui.Desktop desktop) |
Modifier and Type | Method and Description |
---|---|
void |
appendZkLog(java.lang.String message)
Append a debug message of AuLog to current desktop.
|
<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 . |
void |
destroy()
destroy this desktop.
|
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
|
org.zkoss.zk.ui.Desktop |
getDesktop()
Get the attached
Desktop instance. |
Resource |
getDownloadable()
Get the current downloadable resource.
|
java.lang.String |
getId()
get ID.
|
java.util.List<PageAgent> |
getPages()
get pages in this desktop
|
java.lang.String |
getType() |
java.util.List<java.lang.String> |
getZkLog()
Gets the
Clients.log results. |
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.
|
void |
setDownloadable(Resource downloadable)
setting current downloadable file.
|
java.lang.String |
toString() |
public DefaultDesktopAgent(Client client, org.zkoss.zk.ui.Desktop desktop)
public java.lang.String getId()
DesktopAgent
getId
in interface DesktopAgent
public java.lang.String getType()
public java.lang.Object getAttribute(java.lang.String name)
DesktopAgent
getAttribute
in interface DesktopAgent
name
- attribute name.public Client getClient()
Agent
public java.util.List<PageAgent> getPages()
DesktopAgent
getPages
in interface DesktopAgent
public org.zkoss.zk.ui.Desktop getDesktop()
DesktopAgent
Desktop
instance.getDesktop
in interface DesktopAgent
Desktop
instance.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 java.lang.String toString()
toString
in class java.lang.Object
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 void destroy()
DesktopAgent
destroy
in interface DesktopAgent
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.public void setDownloadable(Resource downloadable)
DesktopCtrl
setDownloadable
in interface DesktopCtrl
downloadable
- a downloadable resouce or null indicated there is no downloadable currently.public Resource getDownloadable()
DesktopAgent
getDownloadable
in interface DesktopAgent
public java.util.List<java.lang.String> getZkLog()
DesktopAgent
Clients.log
results.getZkLog
in interface DesktopAgent
public void appendZkLog(java.lang.String message)
DesktopCtrl
appendZkLog
in interface DesktopCtrl
message
- a message.Copyright © 2019 Potix Corporation. All rights reserved.