org.openide.nodes.NodeTransfer.createDndFlavor()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(60)

本文整理了Java中org.openide.nodes.NodeTransfer.createDndFlavor()方法的一些代码示例,展示了NodeTransfer.createDndFlavor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NodeTransfer.createDndFlavor()方法的具体详情如下:
包路径:org.openide.nodes.NodeTransfer
类名称:NodeTransfer
方法名:createDndFlavor

NodeTransfer.createDndFlavor介绍

[英]Creates data flavor for given mask of dnd actions.
[中]为给定的dnd操作掩码创建数据风格。

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-nodes

/** Creates transferable that represents a node operation, such as cut-to-clipboard.
* The transferable will be recognizable by {@link #node}, {@link #nodes}, and {@link #cookie}.
*
* @param n the node to create a transferable for
* @param actions the action performed on the node
* @return the transferable
*/
public static ExTransferable.Single transferable(final Node n, int actions) {
  return new ExTransferable.Single(createDndFlavor(actions)) {
      public Object getData() {
        return n;
      }
    };
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Creates transferable that represents a node operation, such as cut-to-clipboard.
* The transferable will be recognizable by {@link #node}, {@link #nodes}, and {@link #cookie}.
*
* @param n the node to create a transferable for
* @param actions the action performed on the node
* @return the transferable 
*/
public static ExTransferable.Single transferable (final Node n, int actions) {
  return new ExTransferable.Single (createDndFlavor (actions)) {
        public Object getData () {
          return n;
        }
      };
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Creates transferable that represents a node operation, such as cut-to-clipboard.
* The transferable will be recognizable by {@link #node}, {@link #nodes}, and {@link #cookie}.
*
* @param n the node to create a transferable for
* @param actions the action performed on the node
* @return the transferable 
*/
public static ExTransferable.Single transferable (final Node n, int actions) {
  return new ExTransferable.Single (createDndFlavor (actions)) {
        public Object getData () {
          return n;
        }
      };
}

相关文章