*
* @param sender
*/
public void onClick(Widget sender) {
ScrollTable scrollTable = ScrollTableDemo.getScrollTable();
SortableGrid dataTable = ScrollTableDemo.getDataTable();
try {
if (sender == moveRowUpButton) {
// Move row up
int row1 = Integer.parseInt(rowIndexBox1.getText());
dataTable.moveRowUp(row1);
rowIndexBox1.setText((row1 - 1) + "");
} else if (sender == moveRowDownButton) {
// Move row down
int row1 = Integer.parseInt(rowIndexBox1.getText());
dataTable.moveRowDown(row1);
rowIndexBox1.setText((row1 + 1) + "");
} else if (sender == swapRowsButton) {
// Swap two rows
int row1 = Integer.parseInt(rowIndexBox1.getText());
int row2 = Integer.parseInt(rowIndexBox2.getText());
dataTable.swapRows(row1, row2);
} else if (sender == reverseRowsButton) {
// Reverse all rows
dataTable.reverseRows();
} else if (sender == sortColumnButton) {
// Sort a column
int column = Integer.parseInt(columnIndexBox.getText());
dataTable.sortColumn(column);
} else if (sender == makeSortableButton) {
// Make column sortable
int column = Integer.parseInt(columnIndexBox.getText());
scrollTable.setColumnSortable(column, true);
} else if (sender == makeUnsortableButton) {