Object selectedItem = listSortItem.getSelectedValue();
if ((selectedSort instanceof CompositeComparator) &&
(selectedItem instanceof NamedComparator)) {
CompositeComparator comparators = (CompositeComparator) selectedSort;
NamedComparator comparator = (NamedComparator) selectedItem;
comparators.moveComparator(comparator.getName(), up);
int selected = listSortItem.getSelectedIndex();
selected += up ? -1 : 1;
modelSortItem.clear();
for (int i = 0; i < comparators.getComparatorsCount(); i++) {
NamedComparator item = comparators.getComparator(i);