// Iteration before setting the module states. Because of this, all children
// get their final setting before the parent.
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
setParentDefaultModuleSettings(child);
}
if ( ! packageData.isLeaf() ) {
// System.err.println("setParentDefaultModuleSettings: " + packageData.getName());
int state = packageData.getSelectionState();
InstallData installdata = InstallData.getInstance();
boolean allChildrenIgnored = true;
boolean atLeastOneInstalled = false;
boolean allChildrenHidden = true;
// System.err.println(" STATE before iterating over children: " + state);
for (Enumeration e = packageData.children(); e.hasMoreElements();) {
PackageDescription child = (PackageDescription) e.nextElement();
int childState = child.getSelectionState();
// System.err.println(" Child: " + child.getName() + " : " + childState);
if ( childState != PackageDescription.IGNORE) {
allChildrenIgnored = false;
}
if (( childState == PackageDescription.INSTALL) || ( childState == PackageDescription.INSTALL_SOME)) {
atLeastOneInstalled = true;
}
if ( ! child.isHidden() ) {
allChildrenHidden = false;
}
if ((state == PackageDescription.DONT_KNOW) || (state == PackageDescription.IGNORE)) {
state = childState;