}
}
}
public void reload() throws GUIException {
MapDataModel model = getDataModel();
if (model != null) {
try {
processEvents = false;
int[] indices = indexKey == null ? null : (int[]) model.getValue(indexKey);
TableRow values[] = valueKey == null ? null : (TableRow[]) model.getValue(valueKey);
if (indices != null) {
setSelectionIndices(indices);
} else if (values != null) {
setSelectionValues(values);
}
if (((values != null && indices == null) || (values == null && indices == null)) && indexKey != null) {
int indices2[] = table.getSelectedRows();
for (int i = 0; i < indices2.length; i++) {
indices2[i] = sorter.getRowForSortedRow(indices[i]);
}
model.setValue(Table.this, indexKey, indices);
}
if (((indices != null && values == null) || (values == null && indices == null)) && valueKey != null) {
int indices2[] = table.getSelectedRows();
TableRow rows[] = new TableRow[indices2.length];
for (int i = 0; i < indices2.length; i++)
rows[i] = tableDataModel.getTableRow(sorter.getRowForSortedRow(indices2[i]));
model.setValue(Table.this, valueKey, rows);
}
} finally {
processEvents = true;
}
}