/** * Removes and disposes all child layers from this group. */ public void disposeAll() { Layer[] toDispose = children.toArray(new Layer[children.size()]); // remove all of the children efficiently removeAll(); // now that the children have been detached, dispose them for (Layer child : toDispose) child.close(); }
protected void setCurrent (Instance current) { if (_current != current) { _current = current; GroupLayer group = (GroupLayer)content; group.removeAll(); group.add(current.layer()); } }