use of org.netxms.client.datacollection.ColumnDefinition in project netxms by netxms.
the class TableColumns method moveSelectionUp.
/**
* Move selected element up
*/
private void moveSelectionUp() {
final IStructuredSelection selection = (IStructuredSelection) columnList.getSelection();
if (selection.size() != 1)
return;
final ColumnDefinition column = (ColumnDefinition) selection.getFirstElement();
int index = columns.indexOf(column);
if (index > 0) {
Collections.swap(columns, index, index - 1);
columnList.setInput(columns.toArray());
columnList.setSelection(new StructuredSelection(column));
}
}
Aggregations