/** Gets right transferable of given nodes (according to given * drag action) and also converts the transferable.<br> * Can be called only with correct action constant. * @return The transferable. */ static Transferable getNodeTransferable(Node[] nodes, int dragAction) throws IOException { Transferable[] tArray = new Transferable[nodes.length]; for (int i = 0; i < nodes.length; i++) { if ((dragAction & DnDConstants.ACTION_MOVE) != 0) { tArray[i] = nodes[i].clipboardCut(); } else { tArray[i] = nodes[i].drag (); } } Transferable result; if (tArray.length == 1) { // only one node, so return regular single transferable result = tArray[0]; } else { // enclose the transferables into multi transferable result = ExternalDragAndDrop.maybeAddExternalFileDnd( new Multi(tArray) ); } Clipboard c = getClipboard(); if (c instanceof ExClipboard) { return ((ExClipboard) c).convert(result); } else { return result; } }
Clipboard c = getClipboard(); if (c instanceof ExClipboard) { ExClipboard cb = (ExClipboard)c;
Clipboard c = getClipboard(); if (c instanceof ExClipboard) { ExClipboard cb = (ExClipboard)c;