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

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

本文整理了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

  1. @Override
  2. @Deprecated
  3. public boolean add(Node[] arr) {
  4. return original.getChildren().add(arr);
  5. }

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

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

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

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

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

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

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

  1. @Override
  2. @Deprecated
  3. public boolean remove(Node[] arr) {
  4. return original.getChildren().remove(arr);
  5. }

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

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

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

  1. public void traverse(Node child){ // post order traversal
  2. for(Node each : child.getChildren()){
  3. traverse(each);
  4. }
  5. this.printData();
  6. }

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

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

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

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

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

  1. public Node[] callGetNodes(boolean optimalResult) {
  2. Node[] hold = null;
  3. if (optimalResult) {
  4. hold = original.getChildren().getNodes(true);
  5. }
  6. hold = Children.this.getNodes();
  7. return hold;
  8. }

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

  1. public Node[] callGetNodes(boolean optimalResult) {
  2. Node[] hold = null;
  3. if (optimalResult) {
  4. hold = original.getChildren().getNodes(true);
  5. }
  6. hold = Children.this.getNodes();
  7. return hold;
  8. }

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

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

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

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

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

  1. LOGGER.finer(" old original children: " + this.original.getChildren()); // NOI18N
  2. LOGGER.finer(" old original lazy support: " + this.original.getChildren().lazySupport); // NOI18N
  3. LOGGER.finer(" new original: " + original); // NOI18N
  4. LOGGER.finer(" new original children: " + original.getChildren()); // NOI18N
  5. LOGGER.finer(" new original lazy support: " + original.getChildren().lazySupport); // NOI18N
  6. LOGGER.finer(" Children adapter: " + nodeL); // NOI18N

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

  1. private void updateKeys() {
  2. final boolean LOG_ENABLED = LOGGER.isLoggable(Level.FINER);
  3. if (LOG_ENABLED) {
  4. LOGGER.finer("updateKeys() " + this); // NOI18N
  5. }
  6. ChildrenAdapter cha = nodeL;
  7. if (cha != null) {
  8. if (LOG_ENABLED) {
  9. LOGGER.finer(" getting original nodes"); // NOI18N
  10. }
  11. Node[] arr = original.getChildren().getNodes();
  12. if (LOG_ENABLED) {
  13. LOGGER.finer(" setKeys(), keys: " + Arrays.toString(arr)); // NOI18N
  14. }
  15. setKeys(arr);
  16. if (!origSupport.isInitialized()) {
  17. origSupport.notifySetEntries();
  18. }
  19. }
  20. }

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

  1. /** Find the node.
  2. * @return the found node
  3. * @exception IOException if the parent cannot be recreated
  4. * @exception NodeNotFoundException if the path is not valid (exception may be examined for details)
  5. */
  6. public Node getNode() throws java.io.IOException {
  7. Node parentNode = parent.getNode();
  8. Node child = parentNode.getChildren().findChild(path);
  9. if (child != null) {
  10. return child;
  11. } else {
  12. throw new NodeNotFoundException(parentNode, path, 0);
  13. }
  14. }

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

  1. @Override
  2. void switchSupport(boolean toLazy) {
  3. try {
  4. Children.PR.enterWriteAccess();
  5. ((Children.Keys) original.getChildren()).switchSupport(toLazy);
  6. super.switchSupport(toLazy);
  7. } finally {
  8. Children.PR.exitWriteAccess();
  9. }
  10. }

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

  1. private boolean checkSupportChanged() {
  2. FilterChildrenSupport support = (FilterChildrenSupport) entrySupport();
  3. EntrySupport origSupport = original.getChildren().entrySupport();
  4. if (support.originalSupport() != origSupport) {
  5. assert Children.MUTEX.isWriteAccess() : "Should be called only under write access"; // NOI18N
  6. changeSupport(null);
  7. return true;
  8. } else {
  9. return false;
  10. }
  11. }

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

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

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

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

相关文章