本文整理了Java中org.openide.nodes.NodeTransfer.findPaste()
方法的一些代码示例,展示了NodeTransfer.findPaste()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NodeTransfer.findPaste()
方法的具体详情如下:
包路径:org.openide.nodes.NodeTransfer
类名称:NodeTransfer
方法名:findPaste
[英]Find an intelligent source of paste types in a transferable. Note that AbstractNode#createPasteTypes looks for this by default, so cut/copied nodes may specify how they may be pasted to some external node target.
[中]在一个可转移的应用程序中查找粘贴类型的智能源。请注意,AbstractNode#createPasteTypes在默认情况下会查找此选项,因此剪切/复制的节点可能会指定如何将它们粘贴到某个外部节点目标。
代码示例来源:origin: org.netbeans.api/org-openide-nodes
/** 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)));
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** 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)));
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** 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)));
}
}
内容来源于网络,如有侵权,请联系作者删除!