/** Accumulate the paste types that this node can handle * for a given transferable. * <P> * The default implementation simply tests whether the transferable supports * intelligent pasting via {@link NodeTransfer#findPaste}, and if so, it obtains the paste types * from the {@link NodeTransfer.Paste transfer data} and inserts them into the set. * <p>Subclass implementations should typically call super (first or last) so that they * add to, rather than replace, a superclass's available paste types; especially as the * default implementation in <code>AbstractNode</code> is generally desirable to retain. * * @param t a transferable containing clipboard data * @param s a list of {@link PasteType}s that will have added to it all types * valid for this node (ordered as they will be presented to the user) */ protected void createPasteTypes(Transferable t, List<PasteType> s) { NodeTransfer.Paste p = NodeTransfer.findPaste(t); if (p != null) { // adds all its types into the set s.addAll(Arrays.asList(p.types(this))); } }
/** Accumulate the paste types that this node can handle * for a given transferable. * <P> * The default implementation simply tests whether the transferable supports * intelligent pasting via {@link NodeTransfer#findPaste}, and if so, it obtains the paste types * from the {@link NodeTransfer.Paste transfer data} and inserts them into the set. * <p>Subclass implementations should typically call super (first or last) so that they * add to, rather than replace, a superclass's available paste types; especially as the * default implementation in <code>AbstractNode</code> is generally desirable to retain. * * @param t a transferable containing clipboard data * @param s a list of {@link PasteType}s that will have added to it all types * valid for this node (ordered as they will be presented to the user) */ protected void createPasteTypes (Transferable t, List s) { NodeTransfer.Paste p = NodeTransfer.findPaste (t); if (p != null) { // adds all its types into the set s.addAll (Arrays.asList (p.types (this))); } }
/** Accumulate the paste types that this node can handle * for a given transferable. * <P> * The default implementation simply tests whether the transferable supports * intelligent pasting via {@link NodeTransfer#findPaste}, and if so, it obtains the paste types * from the {@link NodeTransfer.Paste transfer data} and inserts them into the set. * <p>Subclass implementations should typically call super (first or last) so that they * add to, rather than replace, a superclass's available paste types; especially as the * default implementation in <code>AbstractNode</code> is generally desirable to retain. * * @param t a transferable containing clipboard data * @param s a list of {@link PasteType}s that will have added to it all types * valid for this node (ordered as they will be presented to the user) */ protected void createPasteTypes (Transferable t, List s) { NodeTransfer.Paste p = NodeTransfer.findPaste (t); if (p != null) { // adds all its types into the set s.addAll (Arrays.asList (p.types (this))); } }