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

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

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

Children.notifyRemove介绍

[英]Notifies that a set of nodes has been removed from children. It is necessary that the system is already in consistent state, so any callbacks will return valid values.
[中]通知已从子节点中删除一组节点。系统必须已经处于一致状态,因此任何回调都将返回有效值。

代码示例

代码示例来源: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.thirdpary-non-maven/openide

notifyRemove (toRemove, current);

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

notifyRemove (toRemove, current);

相关文章