本文整理了Java中org.openide.nodes.Children.nodes()
方法的一些代码示例,展示了Children.nodes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Children.nodes()
方法的具体详情如下:
包路径:org.openide.nodes.Children
类名称:Children
方法名:nodes
[英]Get the nodes as an enumeration.
[中]获取节点作为枚举。
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
private Node getNode(Node node, Object obj) {
Object object = node.getLookup().lookup(obj.getClass());
if (obj.equals(object)) return node;
Enumeration children = node.getChildren().nodes();
while (children.hasMoreElements()) {
Node child = (Node) children.nextElement();
Node result = getNode(child, obj);
if (result != null) return result;
}
return null;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-classview
/**
* Traversing nodes
* for tracing/debugging purposes
*/
protected void traverse(Callback callback) {
callback.call(this);
for( Enumeration children = getChildren().nodes(); children.hasMoreElements(); ) {
Node child = (Node) children.nextElement();
if( child instanceof BaseNode ) {
((BaseNode) child).traverse(callback);
}
}
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-modelutil
protected void dump(Tracer tracer) {
tracer.trace(this.getDisplayName());
tracer.indent();
for( Enumeration children = getChildren().nodes(); children.hasMoreElements(); ) {
Node child = (Node) children.nextElement();
if( child instanceof AbstractCsmNode ) {
((AbstractCsmNode) child).dump(tracer);
}
}
tracer.unindent();
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-jboss4
public void run() {
t.waitFinished();
if(node != null) {
Node apps = node.getParentNode();
if (apps != null) {
Enumeration appTypes = apps.getChildren().nodes();
while (appTypes.hasMoreElements()) {
Node appType = (Node)appTypes.nextElement();
RefreshModulesCookie cookie = (RefreshModulesCookie)
appType.getCookie(RefreshModulesCookie.class);
if (cookie != null) {
cookie.refresh();
}
}
}
}
}
});
内容来源于网络,如有侵权,请联系作者删除!