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

x33g5p2x  于2022-01-18 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(108)

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

Children.justComputeNodes介绍

[英]Computes the nodes now.
[中]现在计算节点。

代码示例

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

/** Getter method to receive a set of computed nodes.
*/
public Node[] nodes () {
  if (children == null) {
    // not fully initialize
    return null;
  }
  if (nodes == null) {
    nodes = children.justComputeNodes ();
    for (int i = 0; i < nodes.length; i++) {
      // keeps a hard reference from the children node to this
      // so we can be GCed only when child nodes are gone
      nodes[i].reassignTo (children, this);
    }
    // if at least one node => be weak
    children.registerChildrenArray (this, nodes.length > 0);
  }
  return nodes;
}

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

/** Getter method to receive a set of computed nodes.
*/
public Node[] nodes () {
  if (children == null) {
    // not fully initialize
    return null;
  }
  if (nodes == null) {
    nodes = children.justComputeNodes ();
    for (int i = 0; i < nodes.length; i++) {
      // keeps a hard reference from the children node to this
      // so we can be GCed only when child nodes are gone
      nodes[i].reassignTo (children, this);
    }
    // if at least one node => be weak
    children.registerChildrenArray (this, nodes.length > 0);
  }
  return nodes;
}

相关文章