boolean isObjCopy = false; Object root = null; boolean isPC = false; String name =  "Deployed System ..."; root = sfResolve ("root",false); if (root==null)  {  root = this.sfResolveWithParser(SmartFrogCoreKeys.SF_ROOT); }  if (root instanceof ComponentDescription) { try { name = ((ComponentDescription)root).sfCompleteName().toString(); } catch (Exception ex){ sfLog().ignore(ex);}  Object value2 = sfResolve("root",false); if (root != value2){ isObjCopy = true; }  } else if (root instanceof Prim) { try { name = sfResolve(SmartFrogCoreKeys.SF_PROCESS, sfProcessName, false); } catch (Exception ex){ sfLog().ignore(ex);} if (root instanceof ProcessCompound){ isPC =true; } }     this.panelTree = new DeployTreePanel(root,isObjCopy, isPC,true); this.panelTree.setEnabled(true); addFrogIcon(display); display.tabPane.add(panelTree, name, 0);   refresh.setText("Refresh"); refresh.setActionCommand("refreshButton"); refresh.addActionListener(this); display.mainToolBar.add(this.refresh); JMenu jMenuMng = new JMenu();  jMenuMng.setText("Mng. Console"); display.jMenuBarDisplay.add(jMenuMng); jCheckBoxMenuItemShowCDasChild.setSelected(true); jCheckBoxMenuItemShowCDasChild.setText("Show show CD as child"); jCheckBoxMenuItemShowCDasChild.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { refresh(); } }); jMenuMng.add(jCheckBoxMenuItemShowCDasChild);  jMenuScriptingPanel.setText("Add Scripting ..."); jMenuScriptingPanel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { addScriptingPanel (display.tabPane, "sfManagementConsole", this,"localhost",3800 ); } catch (Exception e1) { if (sfLogStatic().isErrorEnabled()){ sfLogStatic().error(e1); } WindowUtilities.showError(display,e1.toString()); } refresh(); } }); jMenuMng.add(jMenuScriptingPanel); display.showToolbar(true);
createManagementPaneAsynch();
   public synchronized void sfDeploy() throws SmartFrogException, RemoteException {//      try {         super.sfDeploy();         boolean isObjCopy = false;         Object root = null;         boolean isPC = false;         String name =  "Deployed System ...";         root = sfResolve ("root",false);         if (root==null)  {           // We add the new Tree component here           root = this.sfResolveWithParser(SmartFrogCoreKeys.SF_ROOT);         }         if (root instanceof ComponentDescription) {            try {                name = ((ComponentDescription)root).sfCompleteName().toString();            } catch (Exception ex){ sfLog().ignore(ex);}            Object value2 = sfResolve("root",false);            if (root != value2){                isObjCopy = true;            }         } else if (root instanceof Prim) {             try {                name = sfResolve(SmartFrogCoreKeys.SF_PROCESS, sfProcessName, false);            } catch (Exception ex){ sfLog().ignore(ex);}            if (root instanceof ProcessCompound){                isPC =true;            }         }         //root= new CompoundImpl();         //System.out.println("Root: "+root.toString());         this.panelTree = new DeployTreePanel(root,isObjCopy, isPC,true);         this.panelTree.setEnabled(true);         addFrogIcon(display);         display.tabPane.add(panelTree, name, 0);         // Button for Refresh view ...         refresh.setText("Refresh");         refresh.setActionCommand("refreshButton");         refresh.addActionListener(this);         display.mainToolBar.add(this.refresh);         JMenu jMenuMng = new JMenu();         jMenuMng.setText("Mng. Console");         display.jMenuBarDisplay.add(jMenuMng);         jCheckBoxMenuItemShowCDasChild.setSelected(true);         jCheckBoxMenuItemShowCDasChild.setText("Show show CD as child");         jCheckBoxMenuItemShowCDasChild.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                refresh();            }          });         jMenuMng.add(jCheckBoxMenuItemShowCDasChild);         jMenuScriptingPanel.setText("Add Scripting ...");         jMenuScriptingPanel.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                try {                    addScriptingPanel (display.tabPane, "sfManagementConsole", this,"localhost",3800 );                } catch (Exception e1) {                    if (sfLogStatic().isErrorEnabled()){ sfLogStatic().error(e1); }                    WindowUtilities.showError(display,e1.toString());                }                refresh();            }          });         jMenuMng.add(jMenuScriptingPanel);         display.showToolbar(true);      //end panelTree example   }