public void sort(int index){
  if (isSortable) {
synchronized (table) {
      table.setRedraw(false);
      ColumnInfo info=columnInfos.get(index);
      wasLastSortAscending=lastStortedColumn == null || (lastStortedColumn != info.column || !wasLastSortAscending);
      lastStortedColumn=info.column;
      lastComparator=new TableItemComparator(info.comparator,info.index,wasLastSortAscending);
      sort(lastComparator);
      table.setRedraw(true);
      table.layout(true);
      table.redraw();
      for (      RaptorTableListener listener : tableListeners) {
        listener.tableSorted();
      }
    }
  }
}

public void sort ( int index ) { if ( isSortable ) { synchronized ( table ) { table . setRedraw ( false ) ; ColumnInfo info = columnInfos . get ( index ) ; wasLastSortAscending = lastStortedColumn == null || ( lastStortedColumn != info . column || ! wasLastSortAscending ) ; lastStortedColumn = info . column ; lastComparator = new TableItemComparator ( info . comparator , info . index , wasLastSortAscending ) ; sort ( lastComparator ) ; table . setRedraw ( true ) ; table . layout ( true ) ; table . redraw ( ) ; for ( RaptorTableListener listener : tableListeners ) { listener . tableSorted ( ) ; } } } }
sorts the specified column . keeps track of ascending , descending and toggles them if the same column is sorted twice .
