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

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

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

Node.canCut介绍

[英]Test whether this node permits cutting.
[中]测试此节点是否允许切割。

代码示例

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

  1. public boolean canCut() {
  2. return original.canCut();
  3. }

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

  1. public boolean canCut () {
  2. return original.canCut ();
  3. }

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

  1. public boolean canCut () {
  2. return original.canCut ();
  3. }

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

  1. /** Utility method.
  2. * @return true if given node supports given action,
  3. * false otherwise.
  4. */
  5. static boolean checkNodeForAction (Node node, int dragAction) {
  6. if (node.canCut() &&
  7. ((dragAction == DnDConstants.ACTION_MOVE) ||
  8. (dragAction == DnDConstants.ACTION_COPY_OR_MOVE)))
  9. return true;
  10. if (node.canCopy() &&
  11. ((dragAction == DnDConstants.ACTION_COPY) ||
  12. (dragAction == DnDConstants.ACTION_COPY_OR_MOVE) ||
  13. (dragAction == DnDConstants.ACTION_LINK) ||
  14. (dragAction == DnDConstants.ACTION_REFERENCE)))
  15. return true;
  16. // hmmm, conditions not satisfied..
  17. return false;
  18. }

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

  1. /** Utility method.
  2. * @return true if given node supports given action,
  3. * false otherwise.
  4. */
  5. static boolean checkNodeForAction (Node node, int dragAction) {
  6. if (node.canCut() &&
  7. ((dragAction == DnDConstants.ACTION_MOVE) ||
  8. (dragAction == DnDConstants.ACTION_COPY_OR_MOVE)))
  9. return true;
  10. if (node.canCopy() &&
  11. ((dragAction == DnDConstants.ACTION_COPY) ||
  12. (dragAction == DnDConstants.ACTION_COPY_OR_MOVE) ||
  13. (dragAction == DnDConstants.ACTION_LINK) ||
  14. (dragAction == DnDConstants.ACTION_REFERENCE)))
  15. return true;
  16. // hmmm, conditions not satisfied..
  17. return false;
  18. }

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

  1. /** Utility method.
  2. * @return true if given node supports given action,
  3. * false otherwise.
  4. */
  5. static boolean checkNodeForAction(Node node, int dragAction) {
  6. if (
  7. node.canCut() &&
  8. ((dragAction == DnDConstants.ACTION_MOVE) || (dragAction == DnDConstants.ACTION_COPY_OR_MOVE))
  9. ) {
  10. return true;
  11. }
  12. if (
  13. node.canCopy() &&
  14. ((dragAction == DnDConstants.ACTION_COPY) || (dragAction == DnDConstants.ACTION_COPY_OR_MOVE) ||
  15. (dragAction == DnDConstants.ACTION_LINK) || (dragAction == DnDConstants.ACTION_REFERENCE))
  16. ) {
  17. return true;
  18. }
  19. // hmmm, conditions not satisfied..
  20. return false;
  21. }

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

  1. if (!nodes[i].canCut()) {
  2. possibleNodeAction = DnDConstants.ACTION_COPY | DnDConstants.ACTION_REFERENCE;

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

  1. if (incest || !path[i].canCut()) {
  2. cutActionPerformer.toEnabled(false);

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

  1. if (incest || !path[i].canCut()) {
  2. cutActionPerformer.setEnabled (false);
  3. break;

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

  1. if (incest || !path[i].canCut()) {
  2. cutActionPerformer.setEnabled (false);
  3. break;

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

  1. if (incest || !path[i].canCut()) {
  2. if (attachPerformers) {
  3. cut.setActionPerformer (null);

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

  1. if (incest || !path[i].canCut()) {
  2. if (attachPerformers) {
  3. cut.setActionPerformer (null);

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

  1. for (int i = 0; i < nodes.length; i++) {
  2. if ((possibleNodeAction & DnDConstants.ACTION_MOVE) != 0) {
  3. if (!nodes[i].canCut ()) {
  4. possibleNodeAction = DnDConstants.ACTION_COPY | DnDConstants.ACTION_REFERENCE;

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

  1. for (int i = 0; i < nodes.length; i++) {
  2. if ((possibleNodeAction & DnDConstants.ACTION_MOVE) != 0) {
  3. if (!nodes[i].canCut ()) {
  4. possibleNodeAction = DnDConstants.ACTION_COPY | DnDConstants.ACTION_REFERENCE;

相关文章