Class DefaultPageAgent

    • Constructor Detail

      • DefaultPageAgent

        public DefaultPageAgent​(DesktopAgent desktopAgent,
                                org.zkoss.zk.ui.Page page)
    • Method Detail

      • getId

        public String getId()
        Description copied from interface: PageAgent
        get ID. of the page.
        Specified by:
        getId in interface PageAgent
        Returns:
        ID or null if it hasn't.
      • getType

        public String getType()
      • getAttribute

        public Object getAttribute​(String name)
        Description copied from interface: PageAgent
        get attribute by specify name.
        Specified by:
        getAttribute in interface PageAgent
        Parameters:
        name - attribute name.
        Returns:
        attribute value or null if not found or otherwise.
      • getUuid

        public String getUuid()
        Description copied from interface: PageAgent
        get UUID. of this the page.
        Specified by:
        getUuid in interface PageAgent
        Returns:
        UUID.
      • getRoots

        public List<ComponentAgent> getRoots()
        Description copied from interface: PageAgent
        get root component agents at the page.
        Specified by:
        getRoots in interface PageAgent
        Returns:
        a list contained root component agents.
      • getClient

        public Client getClient()
        Description copied from interface: Agent
        get client this agent belonged to.
        Specified by:
        getClient in interface Agent
      • getPage

        public org.zkoss.zk.ui.Page getPage()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getDelegatee

        public Object getDelegatee()
        Description copied from interface: Agent
        get the delegatee object
        Specified by:
        getDelegatee in interface Agent
      • query

        public ComponentAgent query​(String selector)
        Description copied from interface: QueryAgent
        to find the first component agent with the selector in this query agent.
        Specified by:
        query in interface QueryAgent
        Parameters:
        selector - the selector
        Returns:
        the first component agent, null if not found
      • queryAll

        public List<ComponentAgent> queryAll​(String selector)
        Description copied from interface: QueryAgent
        to find the component agents with the selector in this query agent.
        Specified by:
        queryAll in interface QueryAgent
        Parameters:
        selector - the selector
        Returns:
        the component agents
      • as

        public <T> T as​(Class<T> clazz)
        Description copied from interface: QueryAgent
        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.
        Specified by:
        as in interface QueryAgent
        Parameters:
        clazz - class of specify operation.
        Returns:
        operation object.
      • is

        public <T> boolean is​(Class<T> clazz)
        Description copied from interface: QueryAgent
        Can get a instance of target class for this query agent.
        Specified by:
        is in interface QueryAgent
        Parameters:
        clazz - the class cast to.
        Returns:
        true if can get a instance of target class