/** * Test if the node is a leaf. */ public boolean isLeaf(Object node) { return ((ITreeNode) node).isLeaf(); }
/** * Create transferable on drag start. */ protected Transferable createTransferable(JComponent c) { Transferable ret = null; JTree tree = (JTree)c; TreePath path = tree.getSelectionPath(); Object o = path!=null ? path.getLastPathComponent() : null; if(o instanceof IFileNode && (((ITreeNode)o).isLeaf() || !isRealDirectory((IFileNode)o))) { ret = new NodesTransferable(new TransferInfo(FileTransferServiceViewerPanel.this)); } return ret; }
/** * Create transferable on drag start. */ protected Transferable createTransferable(JComponent c) { Transferable ret = null; JTree tree = (JTree)c; TreePath path = tree.getSelectionPath(); Object o = path!=null ? path.getLastPathComponent() : null; if(o instanceof IFileNode && (((ITreeNode)o).isLeaf() || !isRealDirectory((IFileNode)o))) { ret = new NodesTransferable(new TransferInfo(DeploymentServiceViewerPanel.this)); } return ret; }