this.overridePriority = overridePriority;
}
public boolean changeRowIndex(OID oldIndex, OID newIndex) {
if (model instanceof MOMutableTableModel) {
MOMutableTableModel mutableModel = (MOMutableTableModel) model;
MOTableRow r = mutableModel.removeRow(oldIndex);
if (r == null) {
return false;
}
r.getIndex().setValue(newIndex.getValue());
MOTableRow existingRow = mutableModel.addRow(r);
if (existingRow != null) {
mutableModel.removeRow(newIndex);
r.getIndex().setValue(oldIndex.getValue());
mutableModel.addRow(r);
mutableModel.addRow(existingRow);
return false;
}
fireRowChanged(new MOTableRowEvent(this, this, r,
MOTableRowEvent.UPDATED, false));
return true;