本文整理了Java中org.openide.nodes.Children.clearNodes()
方法的一些代码示例,展示了Children.clearNodes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Children.clearNodes()
方法的具体详情如下:
包路径:org.openide.nodes.Children
类名称:Children
方法名:clearNodes
[英]Clears the nodes
[中]清除节点
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Updates the state of children by adding given Infos.
* @param infos list of Info objects to add
* @param entries the final state of entries that should occur
*/
private void updateAdd (Collection infos, Collection entries) {
LinkedList nodes = new LinkedList ();
Iterator it = infos.iterator ();
while (it.hasNext ()) {
Info info = (Info)it.next ();
nodes.addAll (info.nodes ());
map.put (info.entry, info);
// debug.append ("updateadd: " + info.entry + " info: " + info + '\n'); // NOI18N
// printStackTrace();
}
this.entries = entries;
// debug.append ("Set4: " + entries); // NOI18N
// printStackTrace();
clearNodes ();
notifyAdd (nodes);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Updates the state of children by adding given Infos.
* @param infos list of Info objects to add
* @param entries the final state of entries that should occur
*/
private void updateAdd (Collection infos, Collection entries) {
LinkedList nodes = new LinkedList ();
Iterator it = infos.iterator ();
while (it.hasNext ()) {
Info info = (Info)it.next ();
nodes.addAll (info.nodes ());
map.put (info.entry, info);
// debug.append ("updateadd: " + info.entry + " info: " + info + '\n'); // NOI18N
// printStackTrace();
}
this.entries = entries;
// debug.append ("Set4: " + entries); // NOI18N
// printStackTrace();
clearNodes ();
notifyAdd (nodes);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Removes the objects from the children.
*/
private void updateRemove (Node[] current, Set toRemove) {
LinkedList nodes = new LinkedList ();
Iterator it = toRemove.iterator ();
while (it.hasNext ()) {
Entry en = (Entry)it.next ();
Info info = (Info)map.remove (en);
//debug.append ("Removed: " + en + " info: " + info); // NOI18N
//debug.append ('\n');
//printStackTrace();
nodes.addAll (info.nodes ()); // Has a NullPointerException been thrown?
// In such case consider a key implementation.
// The key hashCode() and equals() methods
// must behave as for an IMMUTABLE object and
// the hashCode() must return the same value
// for equals() keys. Ccc
}
// modify the current set of entries and empty the list of nodes
// so it has to be recreated again
//debug.append ("Current : " + this.entries + '\n'); // NOI18N
this.entries.removeAll (toRemove);
//debug.append ("Removing: " + toRemove + '\n'); // NOI18N
//debug.append ("New : " + this.entries + '\n'); // NOI18N
//printStackTrace();
clearNodes ();
notifyRemove (nodes, current);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Removes the objects from the children.
*/
private void updateRemove (Node[] current, Set toRemove) {
LinkedList nodes = new LinkedList ();
Iterator it = toRemove.iterator ();
while (it.hasNext ()) {
Entry en = (Entry)it.next ();
Info info = (Info)map.remove (en);
//debug.append ("Removed: " + en + " info: " + info); // NOI18N
//debug.append ('\n');
//printStackTrace();
nodes.addAll (info.nodes ()); // Has a NullPointerException been thrown?
// In such case consider a key implementation.
// The key hashCode() and equals() methods
// must behave as for an IMMUTABLE object and
// the hashCode() must return the same value
// for equals() keys. Ccc
}
// modify the current set of entries and empty the list of nodes
// so it has to be recreated again
//debug.append ("Current : " + this.entries + '\n'); // NOI18N
this.entries.removeAll (toRemove);
//debug.append ("Removing: " + toRemove + '\n'); // NOI18N
//debug.append ("New : " + this.entries + '\n'); // NOI18N
//printStackTrace();
clearNodes ();
notifyRemove (nodes, current);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
clearNodes ();
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
if (perm != null) {
clearNodes ();
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
clearNodes ();
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
if (perm != null) {
clearNodes ();
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
clearNodes ();
clearNodes ();
notifyAdd (toAdd);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
clearNodes ();
clearNodes ();
notifyAdd (toAdd);
内容来源于网络,如有侵权,请联系作者删除!