public void mouseClicked(MouseEvent e) { if(!doPopup(e) && e.getClickCount()==2) { JTree tree = (JTree)e.getSource(); TreePath[] paths = tree.getSelectionPaths(); if(paths!=null) { AsyncSwingTreeModel model = (AsyncSwingTreeModel)tree.getModel(); INodeHandler[] handlers = model.getNodeHandlers(); if(handlers!=null) { for(int i=0; paths!=null && i<paths.length; i++) { Action a = null; for(int j=handlers.length-1; a==null && j>=0; j--) { a = ((ISwingNodeHandler) handlers[j]).getDefaultAction((ISwingTreeNode)paths[i].getLastPathComponent()); } if(a!=null) { a.actionPerformed(new ActionEvent(tree, 0, null)); } } } } } }
INodeHandler[] handlers = model.getNodeHandlers(); if(handlers!=null)
INodeHandler[] handlers = ((AsyncSwingTreeModel)tree.getModel()).getNodeHandlers(); for(int i = 0; handlers != null && i < handlers.length; i++)