Package net.sf.agentopia.ui.core

Examples of net.sf.agentopia.ui.core.IAgentopiaAgentGUI


        final IAgentopiaAgent agent = controller.createAgent(agentId);
        final String agentUid = agent.getUID();
        startedAgentIdList.add(agentUid);

        // Try to start per GUI.
        final IAgentopiaAgentGUI agentGui = controller.createAgentGui(agent);
        if (null != agentGui) {
            agentGuiMap.put(agentUid, agentGui);
            agentGui.processAgentCreated(getMarketPlace(), agent, controller);
            startAgentInternalFrame(agentDesktop, agentGui, agent);
        }

        // Or start simple by controller.
        else {
View Full Code Here


        if (!isAgentReturned) {
            return;
        }

        // Determine whether GUI still exists.
        IAgentopiaAgentGUI agentGui = agentGuiMap.get(agentUid);
        final boolean isGuiDeactivated = null == agentGui || agentGui.isDisposed();

        // Try to create new agent GUI if necessary. May result in null,
        // if no agent GUI is available for given agent.
        if (isGuiDeactivated) {
            agentGui = controller.createAgentGui(agent);
View Full Code Here

     *
     * @param agentFrame The agent internal frame.
     */
    private void disposeAgentInternalFrame(AgentRunInternalFrame agentFrame) {
        // Indicate disposal to inner agent GUI.
        final IAgentopiaAgentGUI agentGui = agentFrame.getAgentGui();
        agentGui.dispose();

        // Remove from agent GUI cache.
        final String agentUid = agentFrame.getAgentUID();
        agentGuiMap.remove(agentUid);
    }
View Full Code Here

     */
    private AgentRunInternalFrame getAgentInternalFrame(IAgentopiaAgentGUI agentGui) {
        for (JInternalFrame frame : agentDesktop.getAllFrames()) {
            if (frame instanceof AgentRunInternalFrame) {
                final AgentRunInternalFrame displayedAgentFrame = (AgentRunInternalFrame) frame;
                final IAgentopiaAgentGUI displayedAgentGui = displayedAgentFrame.getAgentGui();
                if (displayedAgentGui == agentGui) {
                    return displayedAgentFrame;
                }
            }
        }
View Full Code Here

TOP

Related Classes of net.sf.agentopia.ui.core.IAgentopiaAgentGUI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.