public void nodeRemoved(ITreeNode node) { if(node instanceof IActiveComponentTreeNode) { IComponentDescription ad = ((IActiveComponentTreeNode)node).getDescription(); // System.out.println("died: "+ad.getName()); agentDied(ad); } } });
public void valueChanged(TreeSelectionEvent e) { JTree tree = comptree.getTree(); if(tree.getSelectionPath()!=null) { Object node = tree.getSelectionPath().getLastPathComponent(); if(node instanceof IActiveComponentTreeNode) { cards.show(((IActiveComponentTreeNode)node).getId()); } } } });
else if(node.getComponentIdentifier()!=null) // Might by null initially for proxy node. if(!lookup.getSecondEntity().contains(node.getComponentIdentifier().getRoot())) lookup.getSecondEntity().add(node.getComponentIdentifier().getRoot()); fut = lookup.getFirstEntity(); if(!jccaccess.getComponentIdentifier().getRoot().equals(node.getComponentIdentifier().getRoot())) todo.add(node.getComponentIdentifier().getRoot()); // Search remote if not found locally.
final IComponentIdentifier cid = ((IActiveComponentTreeNode)node).getComponentIdentifier();
public void nodeAdded(ITreeNode node) { if(node instanceof IActiveComponentTreeNode) { IComponentDescription ad = ((IActiveComponentTreeNode)node).getDescription(); // System.out.println("born: "+ad.getName()); agentBorn(ad); } }
public void valueChanged(TreeSelectionEvent e) { JTree tree = comptree.getTree(); if(tree.getSelectionPath()!=null) { Object node = tree.getSelectionPath().getLastPathComponent(); if(node instanceof IActiveComponentTreeNode) { cards.show(((IActiveComponentTreeNode)node).getId()); } } } });
AbstractJCCPlugin.getClassLoader(((IActiveComponentTreeNode)node.getParent().getParent()).getComponentIdentifier(), jcc) .addResultListener(new ExceptionDelegationResultListener<ClassLoader, JComponent>(ret)
public Action getDefaultAction(ISwingTreeNode node) { Action a = null; if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(((IActiveComponentTreeNode)node).getDescription())!=null) { a = STOP_PROFILER; } else if(BDIAgentFactory.FILETYPE_BDIAGENT.equals(((IActiveComponentTreeNode)node).getDescription().getType())) { a = START_PROFILER; } } return a; } });
public void actionPerformed(ActionEvent e) { TreePath[] paths = comptree.getTree().getSelectionPaths(); for(int i=0; paths!=null && i<paths.length; i++) { if(paths[i].getLastPathComponent() instanceof IActiveComponentTreeNode) { IActiveComponentTreeNode node = (IActiveComponentTreeNode)paths[i].getLastPathComponent(); DebuggerMainPanel panel = (DebuggerMainPanel)cards.getComponent(node.getId()); panel.dispose(); detail.remove(panel); comptree.getModel().fireNodeChanged(node); } } } };
/** * Create a new component node. */ public ISwingTreeNode createComponentNode(final IComponentDescription desc) { ISwingTreeNode node = getModel().getNode(desc.getName()); if(node==null) { boolean proxy = "jadex.platform.service.remote.Proxy".equals(desc.getModelName()) // Only create proxy nodes for local proxy components to avoid infinite nesting. && ((IActiveComponentTreeNode)getModel().getRoot()).getComponentIdentifier().getName().equals(desc.getName().getPlatformName()); if(proxy) { node = new ProxyComponentTreeNode(ComponentTreeNode.this, getModel(), getTree(), desc, cms, iconcache, access); } else { node = new ComponentTreeNode(ComponentTreeNode.this, getModel(), getTree(), desc, cms, iconcache, access); } } return node; }
public void nodeRemoved(final ITreeNode node) { if(node instanceof IActiveComponentTreeNode) { if(((IActiveComponentTreeNode)node).getDescription().getName().equals(spanel.parent)) spanel.setParent(null); } }
public void actionPerformed(ActionEvent e) { TreePath[] paths = comptree.getTree().getSelectionPaths(); for(int i=0; paths!=null && i<paths.length; i++) { if(paths[i].getLastPathComponent() instanceof IActiveComponentTreeNode) { IActiveComponentTreeNode node = (IActiveComponentTreeNode)paths[i].getLastPathComponent(); DebuggerMainPanel panel = (DebuggerMainPanel)cards.getComponent(node.getId()); panel.dispose(); detail.remove(panel); comptree.getModel().fireNodeChanged(node); } } } };
final IComponentIdentifier cid = ((IActiveComponentTreeNode)node).getComponentIdentifier();
public void nodeRemoved(final ITreeNode node) { if(node instanceof IActiveComponentTreeNode) { if(((IActiveComponentTreeNode)node).getDescription().getName().equals(spanel.parent)) spanel.setParent(null); } }
final IComponentIdentifier cid = node.getComponentIdentifier();
public Icon getSwingOverlay(ISwingTreeNode node) { Icon ret = null; if(node instanceof IActiveComponentTreeNode) { IComponentDescription ad = ((IActiveComponentTreeNode)node).getDescription(); if(cards.getComponent(ad)!=null) { ret = icons.getIcon("component_debugged"); } } return ret; }
final IComponentIdentifier cid = node.getComponentIdentifier();
public void actionPerformed(ActionEvent e) { TreePath[] paths = comptree.getTree().getSelectionPaths(); for(int i=0; paths!=null && i<paths.length; i++) { if(paths[i].getLastPathComponent() instanceof IActiveComponentTreeNode && BDIAgentFactory.FILETYPE_BDIAGENT.equals(((IActiveComponentTreeNode)paths[i].getLastPathComponent()).getDescription().getType())) { IActiveComponentTreeNode node = (IActiveComponentTreeNode)paths[i].getLastPathComponent(); IComponentDescription desc = node.getDescription(); RuleProfilerPanel intro = (RuleProfilerPanel)cards.getComponent(desc); detail.remove(intro); comptree.getModel().fireNodeChanged(node); } } } };
public Icon getSwingOverlay(ISwingTreeNode node) { Icon ret = null; if(node instanceof IActiveComponentTreeNode) { IComponentIdentifier id = ((IActiveComponentTreeNode)node).getDescription().getName(); IComponentIdentifier[] recs = (IComponentIdentifier[])convcenter.getMessagePanel().getReceivers(); if(recs!=null && Arrays.asList(recs).contains(id)) { ret = icons.getIcon("message_overlay"); } } return ret; }
public Icon getSwingOverlay(ISwingTreeNode node) { Icon ret = null; IComponentDescription desc = null; if(node instanceof IActiveComponentTreeNode) { desc = ((IActiveComponentTreeNode)node).getDescription(); // if(IComponentDescription.PROCESSINGSTATE_READY.equals(desc.getProcessingState())) // { // ret = icons.getIcon("overlay_ready"); // } // else if(IComponentDescription.PROCESSINGSTATE_RUNNING.equals(desc.getProcessingState())) // { // ret = icons.getIcon("overlay_running"); // } // else if(IComponentDescription.PROCESSINGSTATE_IDLE.equals(desc.getProcessingState())) // { // // -> susp // } if(IComponentDescription.STATE_SUSPENDED.equals(desc.getState())) { ret = icons.getIcon("component_suspended"); } } return ret; }