Package org.zkoss.zats.mimic.impl
Class DefaultDesktopAgent
java.lang.Object
org.zkoss.zats.mimic.impl.DefaultDesktopAgent
- All Implemented Interfaces:
Agent,DesktopAgent,DesktopCtrl,QueryAgent
Default implementation fof DesktopAgent.
- Author:
- dennis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendZkLog(String message) Append a debug message of AuLog to current desktop.<T> TTry to get a instance of target class for this query agent, the target class is usually aOperationAgentor a nativeComponent
if it cannot get a instance of target class, it will throwAgentException.voiddestroy()destroy this desktop.booleangetAttribute(String name) get attribute by specify name.get client this agent belonged to.get the delegatee objectorg.zkoss.zk.ui.DesktopGet the attachedDesktopinstance.Get the current downloadable resource.getId()get ID.getPages()get pages in this desktopgetType()getZkLog()Gets theClients.logresults.inthashCode()<T> booleanCan get a instance of target class for this query agent.to find the first component agent with the selector in this query agent.to find the component agents with the selector in this query agent.voidsetDownloadable(Resource downloadable) setting current downloadable file.toString()
-
Constructor Details
-
DefaultDesktopAgent
-
-
Method Details
-
getId
Description copied from interface:DesktopAgentget ID. of this the desktop.- Specified by:
getIdin interfaceDesktopAgent- Returns:
- ID or null if it hasn't.
-
getType
-
getAttribute
Description copied from interface:DesktopAgentget attribute by specify name.- Specified by:
getAttributein interfaceDesktopAgent- Parameters:
name- attribute name.- Returns:
- attribute value or null if not found or otherwise.
-
getClient
Description copied from interface:Agentget client this agent belonged to. -
getPages
Description copied from interface:DesktopAgentget pages in this desktop- Specified by:
getPagesin interfaceDesktopAgent
-
getDesktop
public org.zkoss.zk.ui.Desktop getDesktop()Description copied from interface:DesktopAgentGet the attachedDesktopinstance.- Specified by:
getDesktopin interfaceDesktopAgent- Returns:
- the attached
Desktopinstance.
-
hashCode
public int hashCode() -
equals
-
getDelegatee
Description copied from interface:Agentget the delegatee object- Specified by:
getDelegateein interfaceAgent
-
toString
-
query
Description copied from interface:QueryAgentto find the first component agent with the selector in this query agent.- Specified by:
queryin interfaceQueryAgent- Parameters:
selector- the selector- Returns:
- the first component agent, null if not found
-
queryAll
Description copied from interface:QueryAgentto find the component agents with the selector in this query agent.- Specified by:
queryAllin interfaceQueryAgent- Parameters:
selector- the selector- Returns:
- the component agents
-
destroy
public void destroy()Description copied from interface:DesktopAgentdestroy this desktop.- Specified by:
destroyin interfaceDesktopAgent
-
as
Description copied from interface:QueryAgentTry to get a instance of target class for this query agent, the target class is usually aOperationAgentor a nativeComponent
if it cannot get a instance of target class, it will throwAgentException.- Specified by:
asin interfaceQueryAgent- Parameters:
clazz- class of specify operation.- Returns:
- operation object.
-
is
Description copied from interface:QueryAgentCan get a instance of target class for this query agent.- Specified by:
isin interfaceQueryAgent- Parameters:
clazz- the class cast to.- Returns:
- true if can get a instance of target class
-
setDownloadable
Description copied from interface:DesktopCtrlsetting current downloadable file.- Specified by:
setDownloadablein interfaceDesktopCtrl- Parameters:
downloadable- a downloadable resouce or null indicated there is no downloadable currently.
-
getDownloadable
Description copied from interface:DesktopAgentGet the current downloadable resource.- Specified by:
getDownloadablein interfaceDesktopAgent- Returns:
- downloadable resource or null if there is no such resource.
-
getZkLog
Description copied from interface:DesktopAgentGets theClients.logresults.- Specified by:
getZkLogin interfaceDesktopAgent- Returns:
- Messages. An empty list if no message.
-
appendZkLog
Description copied from interface:DesktopCtrlAppend a debug message of AuLog to current desktop.- Specified by:
appendZkLogin interfaceDesktopCtrl- Parameters:
message- a message.
-