Java Code Examples for org.eclipse.swt.widgets.Tree.setSortColumn()

The following are Jave code examples for showing how to use setSortColumn() of the org.eclipse.swt.widgets.Tree class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: depan   File: NodeStatsTableControl.java   Source Code and License Vote up 7 votes
private void setSortColumn(
    TreeColumn column, int colIndex, int direction) {

  ViewerComparator sorter = buildColumnSorter(colIndex);
  if (SWT.UP == direction) {
    sorter = new InverseSorter(sorter);
  }

  Tree tree = propViewer.getTree();
  tree.setSortColumn(column);
  tree.setSortDirection(direction);

  propViewer.setComparator(sorter);
}
 
Example 2
Project: depan   File: NodeDisplayTableControl.java   Source Code and License Vote up 7 votes
private void setSortColumn(
    TreeColumn column, int colIndex, int direction) {

  ViewerComparator sorter = buildColumnSorter(colIndex);
  if (SWT.UP == direction) {
    sorter = new InverseSorter(sorter);
  }

  Tree tree = propViewer.getTree();
  tree.setSortColumn(column);
  tree.setSortDirection(direction);

  propViewer.setComparator(sorter);
}