本文整理了Java中org.openide.nodes.Node.reassignTo()
方法的一些代码示例,展示了Node.reassignTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.reassignTo()
方法的具体详情如下:
包路径:org.openide.nodes.Node
类名称:Node
方法名:reassignTo
[英]Code that reasignes the reference from to parent from its Children to its ChildrenArray.
[中]将“从到父”的引用从其子数组重新分配到其子数组的代码。
代码示例来源:origin: org.netbeans.api/org-openide-nodes
/** Getter method to receive a set of computed nodes.
*/
public Node[] nodes() {
if (entrySupport == null) {
// not fully initialize
return null;
}
if (nodes == null) {
nodes = entrySupport.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(entrySupport.children, this);
}
// if at least one node => be weak
entrySupport.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;
}
代码示例来源: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;
}
内容来源于网络,如有侵权,请联系作者删除!