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

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

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

Node.getChildren介绍

[英]Get the list of children.
[中]获取孩子的名单。

代码示例

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

@Override
@Deprecated
public boolean add(Node[] arr) {
  return original.getChildren().add(arr);
}

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

/** Look for a node child of given name.
* @param node node to search in
* @param name name of child to look for
* @return the found child, or <code>null</code> if there is no such child
*/
public static Node findChild(Node node, String name) {
  return node.getChildren().findChild(name);
}

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

/** Create children.
 * @param or original node to take children from */
public Children(Node or) {
  this(or, or.getChildren().isLazy());
}

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

/** Package private constructor to allow construction only
* @param node the node that has changed
* @param newIndices new indexes of the nodes
*/
NodeReorderEvent(Node n, int[] newIndices) {
  super(n);
  this.newIndices = newIndices;
  this.currSnapshot = n.getChildren().snapshot();
}

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

@Override
@Deprecated
public boolean remove(Node[] arr) {
  return original.getChildren().remove(arr);
}

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

/** Package private constructor to allow construction only
* @param n node that should fire change
* @param add true if nodes has been added
* @param delta array of nodes that have changed
* @param from nodes to find indices in
*/
NodeMemberEvent(Node n, boolean add, Node[] delta, Node[] from) {
  super(n);
  this.add = add;
  this.delta = delta;
  this.prevSnapshot = from != null ? Arrays.asList(from) : null;
  this.currSnapshot = n.getChildren().snapshot();
}

代码示例来源:origin: stackoverflow.com

public void traverse(Node child){ // post order traversal
  for(Node each : child.getChildren()){
    traverse(each);
  }
  this.printData();
}

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

@Override
public int callGetNodesCount(boolean optimalResult) {
  return original.getChildren().getNodesCount(optimalResult);
}

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

@Override
public int callGetNodesCount(boolean optimalResult) {
  int cnt = 0;
  if (optimalResult) {
    cnt = original.getChildren().getNodesCount(true);
  }
  int ret = Children.this.getNodesCount();
  LOG.log(Level.FINEST, "Count {1} gives {2}", new Object[]{cnt, ret});
  return ret;
}

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

public Node[] callGetNodes(boolean optimalResult) {
  Node[] hold = null;
  if (optimalResult) {
    hold = original.getChildren().getNodes(true);
  }
  hold = Children.this.getNodes();
  return hold;
}

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

public Node[] callGetNodes(boolean optimalResult) {
  Node[] hold = null;
  if (optimalResult) {
    hold = original.getChildren().getNodes(true);
  }
  hold = Children.this.getNodes();
  return hold;
}

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

public Node findChild(String name) {
  Node dontGC = original.getChildren().findChild(name);
  return Children.super.findChild(name);
}

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

public Node findChild(String name) {
  original.getChildren().findChild(name);
  return Children.super.findChild(name);
}

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

LOGGER.finer("    old original children: " + this.original.getChildren()); // NOI18N
LOGGER.finer("    old original lazy support: " + this.original.getChildren().lazySupport); // NOI18N
LOGGER.finer("    new original: " + original); // NOI18N
LOGGER.finer("    new original children: " + original.getChildren()); // NOI18N
LOGGER.finer("    new original lazy support: " + original.getChildren().lazySupport); // NOI18N
LOGGER.finer("    Children adapter: " + nodeL); // NOI18N

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

private void updateKeys() {
  final boolean LOG_ENABLED = LOGGER.isLoggable(Level.FINER);
  if (LOG_ENABLED) {
    LOGGER.finer("updateKeys() " + this); // NOI18N
  }
  ChildrenAdapter cha = nodeL;
  if (cha != null) {
    if (LOG_ENABLED) {
      LOGGER.finer("    getting original nodes"); // NOI18N
    }
    Node[] arr = original.getChildren().getNodes();
    if (LOG_ENABLED) {
      LOGGER.finer("    setKeys(), keys: " + Arrays.toString(arr)); // NOI18N
    }
    setKeys(arr);
    if (!origSupport.isInitialized()) {
      origSupport.notifySetEntries();
    }
  }
}

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

/** Find the node.
* @return the found node
* @exception IOException if the parent cannot be recreated
* @exception NodeNotFoundException if the path is not valid (exception may be examined for details)
*/
public Node getNode() throws java.io.IOException {
  Node parentNode = parent.getNode();
  Node child = parentNode.getChildren().findChild(path);
  if (child != null) {
    return child;
  } else {
    throw new NodeNotFoundException(parentNode, path, 0);
  }
}

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

@Override
void switchSupport(boolean toLazy) {        
  try {
    Children.PR.enterWriteAccess();
    ((Children.Keys) original.getChildren()).switchSupport(toLazy);
    super.switchSupport(toLazy);
  } finally {
    Children.PR.exitWriteAccess();
  }
}

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

private boolean checkSupportChanged() {
  FilterChildrenSupport support = (FilterChildrenSupport) entrySupport();
  EntrySupport origSupport = original.getChildren().entrySupport();
  if (support.originalSupport() != origSupport) {
    assert Children.MUTEX.isWriteAccess() : "Should be called only under write access"; // NOI18N
    changeSupport(null);
    return true;
  } else {
    return false;
  }
}

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

Node foundChild = parentNode.getChildren().findChild(childPath);
if (foundChild != node) {
  Logger.getLogger(DefaultHandle.class.getName()).log(Level.WARNING,

代码示例来源:origin: stackoverflow.com

node.hasChanges() && node.getChildren().isEmpty()) {
MongoDiffHistoryChangeItem diffItem = new MongoDiffHistoryChangeItem();
diffItem.setPath(node.getPropertyPath().toString());

相关文章

微信公众号

最新文章

更多