void setWidgetSortIndicator () {
		TableColumn [] columns = table1.getColumns();
		if (sortIndicatorButton.getSelection ()) {
			/* Reset to known state: 'down' on column 0. */
			table1.setSortDirection (SWT.DOWN);
			for (int i = 0; i < columns.length; i++) {
				TableColumn column = columns[i];
				if (i == 0) table1.setSortColumn(column);
				SelectionListener listener = new SelectionAdapter() {
					public void widgetSelected(SelectionEvent e) {
						int sortDirection = SWT.DOWN;
						if (e.widget == table1.getSortColumn()) {
							/* If the sort column hasn't changed, cycle down -> up -> none. */
							switch (table1.getSortDirection ()) {
							case SWT.DOWN: sortDirection = SWT.UP; break;
							case SWT.UP: sortDirection = SWT.NONE; break;
							}
						} else {
							table1.setSortColumn((TableColumn)e.widget);
						}
						table1.setSortDirection (sortDirection);
					}
				};
				column.addSelectionListener(listener);
				column.setData("SortListener", listener);	//$NON-NLS-1$
			}
		} else {
			table1.setSortDirection (SWT.NONE);
			for (int j = 0; j < columns.length; j++) {
				SelectionListener listener = (SelectionListener)columns[j].getData("SortListener");	//$NON-NLS-1$
				if (listener != null) columns[j].removeSelectionListener(listener);
			}
		}
	}