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

x33g5p2x  于2022-01-24 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(182)

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

Node.clipboardCut介绍

[英]Called when a node is to be cut to the clipboard.
[中]将节点剪切到剪贴板时调用。

代码示例

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

  1. public Transferable clipboardCut() throws IOException {
  2. return original.clipboardCut();
  3. }

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

  1. public Transferable clipboardCut () throws IOException {
  2. return original.clipboardCut ();
  3. }

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

  1. public Transferable clipboardCut () throws IOException {
  2. return original.clipboardCut ();
  3. }

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

  1. private static Transferable getTransferableOwner(Node node, boolean copyCut) {
  2. try {
  3. return copyCut ? node.clipboardCopy() : node.clipboardCut();
  4. } catch (IOException e) {
  5. LOG.log(Level.WARNING, null, e);
  6. return null;
  7. }
  8. }

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

  1. private Transferable getTransferableOwner(Node node) {
  2. try {
  3. return copyCut ? node.clipboardCopy() : node.clipboardCut();
  4. } catch (java.io.IOException e) {
  5. ErrorManager.getDefault ().notify(ErrorManager.INFORMATIONAL, e);
  6. return null;
  7. }
  8. }

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-project-ui

  1. @Override public Transferable clipboardCut() throws IOException {
  2. DataFolder top = topPackage();
  3. if (top != null) {
  4. return top.getNodeDelegate().clipboardCut();
  5. } else {
  6. return super.clipboardCut();
  7. }
  8. }

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

  1. private Transferable getTransferableOwner(Node node) {
  2. try {
  3. return copyCut ? node.clipboardCopy() : node.clipboardCut();
  4. } catch (java.io.IOException e) {
  5. ErrorManager.getDefault ().notify(ErrorManager.INFORMATIONAL, e);
  6. return null;
  7. }
  8. }

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

  1. private Transferable getTransferableOwner(Node node) {
  2. try {
  3. return copyCut ? node.clipboardCopy() : node.clipboardCut();
  4. } catch (java.io.IOException e) {
  5. ErrorManager.getDefault ().notify(ErrorManager.INFORMATIONAL, e);
  6. return null;
  7. }
  8. }

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

  1. private Transferable getTransferableOwner(Node node) {
  2. try {
  3. return copyCut ? node.clipboardCopy() : node.clipboardCut();
  4. } catch (java.io.IOException e) {
  5. ErrorManager.getDefault ().notify(ErrorManager.INFORMATIONAL, e);
  6. return null;
  7. }
  8. }

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

  1. ExClipboard cb = (ExClipboard)c;
  2. if ((dragAction & DnDConstants.ACTION_MOVE) != 0) {
  3. tArray[i] = cb.convert (nodes[i].clipboardCut());
  4. tArray[i] = nodes[i].clipboardCut();

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

  1. ExClipboard cb = (ExClipboard)c;
  2. if ((dragAction & DnDConstants.ACTION_MOVE) != 0) {
  3. tArray[i] = cb.convert (nodes[i].clipboardCut());
  4. tArray[i] = nodes[i].clipboardCut();

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

  1. /** Gets right transferable of given nodes (according to given
  2. * drag action) and also converts the transferable.<br>
  3. * Can be called only with correct action constant.
  4. * @return The transferable.
  5. */
  6. static Transferable getNodeTransferable(Node[] nodes, int dragAction)
  7. throws IOException {
  8. Transferable[] tArray = new Transferable[nodes.length];
  9. for (int i = 0; i < nodes.length; i++) {
  10. if ((dragAction & DnDConstants.ACTION_MOVE) != 0) {
  11. tArray[i] = nodes[i].clipboardCut();
  12. } else {
  13. tArray[i] = nodes[i].drag ();
  14. }
  15. }
  16. Transferable result;
  17. if (tArray.length == 1) {
  18. // only one node, so return regular single transferable
  19. result = tArray[0];
  20. } else {
  21. // enclose the transferables into multi transferable
  22. result = ExternalDragAndDrop.maybeAddExternalFileDnd( new Multi(tArray) );
  23. }
  24. Clipboard c = getClipboard();
  25. if (c instanceof ExClipboard) {
  26. return ((ExClipboard) c).convert(result);
  27. } else {
  28. return result;
  29. }
  30. }

相关文章