/** * Get the id used for lookup. */ public Object getId() { // return ((ComponentTreeNode)getParent()).getDescription().getName().getName()+toString(); return getParent().getId()+NAME; }
/** * Action performed. */ public void actionPerformed(ActionEvent e) { final ISwingTreeNode root = (ISwingTreeNode)treepanel.getTree().getModel().getRoot(); root.getChildren().addResultListener(new SwingDefaultResultListener() { public void customResultAvailable(Object result) { if(result!=null) { List childs = (List)result; for(int i=0; i<childs.size(); i++) { ISwingTreeNode child = (ISwingTreeNode)childs.get(i); TreePath tp = new TreePath(new Object[]{root, child}); treepanel.getTree().collapsePath(tp); } } } }); }
public void actionPerformed(ActionEvent e) { TreePath path = tree.getSelectionPath(); if(path!=null && ((ISwingTreeNode)path.getLastPathComponent()).hasProperties()) { showProperties(((ISwingTreeNode)path.getLastPathComponent()).getPropertiesComponent()); } } };
for(int i=0; allob && i<nodes.length; i++) allob = cards.getComponent(nodes[i].getId())!=null; allig = cards.getComponent(nodes[i].getId())==null; Icon base = nodes[0].getSwingIcon(); Action a = new AbstractAction((String)START_DEBUGGER.getValue(Action.NAME), base!=null ? new CombiIcon(new Icon[]{base, icons.getIcon("component_debugged")}) : (Icon)START_DEBUGGER.getValue(Action.SMALL_ICON)) Icon base = nodes[0].getSwingIcon(); Action a = new AbstractAction((String)STOP_DEBUGGER.getValue(Action.NAME), base!=null ? new CombiIcon(new Icon[]{base, icons.getIcon("stop_debugger")}) : (Icon)STOP_DEBUGGER.getValue(Action.SMALL_ICON))
Icon base = nodes[0].getSwingIcon();
public Action[] getPopupActions(ISwingTreeNode[] nodes) Icon base = ((ISwingTreeNode) nodes[0]).getSwingIcon(); if(nodes[0].hasProperties())
Icon icon = node.getSwingIcon(); String tooltip = node.getTooltipText();
List siblings = getParent().getCachedChildren(); if(lastsiblings==null || !lastsiblings.equals(siblings))
for(int i=0; allob && i<nodes.length; i++) allob = cards.getComponent(nodes[i].getId())!=null; allig = cards.getComponent(nodes[i].getId())==null; Icon base = nodes[0].getSwingIcon(); Action a = new AbstractAction((String)START_DEBUGGER.getValue(Action.NAME), base!=null ? new CombiIcon(new Icon[]{base, icons.getIcon("component_debugged")}) : (Icon)START_DEBUGGER.getValue(Action.SMALL_ICON)) Icon base = nodes[0].getSwingIcon(); Action a = new AbstractAction((String)STOP_DEBUGGER.getValue(Action.NAME), base!=null ? new CombiIcon(new Icon[]{base, icons.getIcon("stop_debugger")}) : (Icon)STOP_DEBUGGER.getValue(Action.SMALL_ICON))
Icon base = (nodes[0]).getSwingIcon(); Action pkill = new AbstractAction((String)kill.getValue(Action.NAME), base!=null ? new CombiIcon(new Icon[]{base, icons.getIcon("overlay_kill")}) : (Icon)kill.getValue(Action.SMALL_ICON))
/** * Create a node path for a given node. */ public static NodePath createNodePath(ISwingTreeNode node) { if(node instanceof RootNode) System.out.println("wurksn"); RootNode root = null; List path = new LinkedList(); while(root==null) { if(node.getParent() instanceof RootNode) { root = (RootNode)node.getParent(); } else { path.add(0, ((IFileNode)node).getFileName()); node = node.getParent(); } } return new NodePath(root.getIndex(node), (String[])path.toArray(new String[path.size()])); } }
List siblings = getParent().getCachedChildren(); for(int i=0; siblings!=null && i<siblings.size(); i++)
for(int i=0; allob && i<nodes.length; i++) allob = cards.getComponent(nodes[i].getId())!=null; allig = cards.getComponent(nodes[i].getId())==null; Icon base = nodes[0].getSwingIcon(); Action a = new AbstractAction((String)START_VIEWER.getValue(Action.NAME), base!=null ? new CombiIcon(new Icon[]{base, icons.getIcon("overlay_viewed")}) : (Icon)START_VIEWER.getValue(Action.SMALL_ICON)) Icon base = nodes[0].getSwingIcon(); Action a = new AbstractAction((String)STOP_VIEWER.getValue(Action.NAME), base!=null ? new CombiIcon(new Icon[]{base, icons.getIcon("overlay_notviewed")}) : (Icon)STOP_VIEWER.getValue(Action.SMALL_ICON))
public Action getDefaultAction(ISwingTreeNode node) { Action a = null; if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(node.getId())!=null) { a = STOP_DEBUGGER; } else { a = START_DEBUGGER; } } return a; } });
Icon base = nodes[0].getSwingIcon(); Action a = new AbstractAction((String)START_PROFILER.getValue(Action.NAME), base!=null ? new CombiIcon(new Icon[]{base, icons.getIcon("component_debugged")}) : (Icon)START_PROFILER.getValue(Action.SMALL_ICON)) Icon base = nodes[0].getSwingIcon(); Action a = new AbstractAction((String)STOP_PROFILER.getValue(Action.NAME), base!=null ? new CombiIcon(new Icon[]{base, icons.getIcon("stop_debugger")}) : (Icon)STOP_PROFILER.getValue(Action.SMALL_ICON))
public boolean isEnabled() { ISwingTreeNode rm = (ISwingTreeNode)treepanel.getTree().getLastSelectedPathComponent(); return rm!=null && rm.getParent().equals(treepanel.getTree().getModel().getRoot()); } };
public Action getDefaultAction(ISwingTreeNode node) { Action a = null; if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(node.getId())!=null) { a = STOP_DEBUGGER; } else { a = START_DEBUGGER; } } return a; } });
if(node instanceof IFileNode && node.getParent().equals(getTree().getModel().getRoot()))