for (int i = e.getIndex(); i < list.getSize(); i++) {
UIAggregate newAgg = list.getAgg(i);
XulTreeRow newRow = (XulTreeRow) document.createElement("treerow");
XulTreeCell newCell = (XulTreeCell) document.createElement("treecell");
newCell.setValue(newAgg.getEnabled());
newRow.addCell(newCell);
newCell = (XulTreeCell) document.createElement("treecell");
newCell.setLabel(newAgg.isAlgoAgg() ? Messages.getString("agg_type_advisor") : Messages.getString("agg_type_custom"));
newRow.addCell(newCell);
newCell = (XulTreeCell) document.createElement("treecell");
newCell.setLabel(newAgg.getName());
newRow.addCell(newCell);
newCell = (XulTreeCell) document.createElement("treecell");
double rowCount = newAgg.estimateRowCount();
if (rowCount == 0) {
newCell.setLabel(ESTIMATE_UNKNOWN);
} else {
newCell.setLabel(format.format(rowCount));
}
newRow.addCell(newCell);
newCell = (XulTreeCell) document.createElement("treecell");
double space = newAgg.estimateSpace();
if (space == 0) {
newCell.setLabel(ESTIMATE_UNKNOWN);
} else {
newCell.setLabel(format.format(space));
}
newRow.addCell(newCell);
aggTable.addTreeRow(newRow);
}
changeInAggregates();
} catch (XulException xe) {
logger.error("Error adding new row to Agg table", xe);
}
break;
case AGG_ADDED:
try {
UIAggregate newAgg = list.getAgg(e.getIndex());
XulTreeRow newRow = (XulTreeRow) document.createElement("treerow");
XulTreeCell newCell = (XulTreeCell) document.createElement("treecell");
newCell.setValue(newAgg.getEnabled());
newRow.addCell(newCell);
newCell = (XulTreeCell) document.createElement("treecell");
newCell.setLabel(newAgg.isAlgoAgg() ? Messages.getString("agg_type_advisor") : Messages.getString("agg_type_custom"));
newRow.addCell(newCell);
newCell = (XulTreeCell) document.createElement("treecell");
newCell.setLabel(newAgg.getName());
newRow.addCell(newCell);
newCell = (XulTreeCell) document.createElement("treecell");
double rowCount = newAgg.estimateRowCount();
if (rowCount == 0) {
newCell.setLabel(ESTIMATE_UNKNOWN);
} else {
newCell.setLabel(format.format(rowCount));
}
newRow.addCell(newCell);
newCell = (XulTreeCell) document.createElement("treecell");
double space = newAgg.estimateSpace();
if (space == 0) {
newCell.setLabel(ESTIMATE_UNKNOWN);
} else {
newCell.setLabel(format.format(space));
}
newRow.addCell(newCell);
aggTable.addTreeRow(newRow);