private void sort(int columnIndex,int sortCount){
  SortOrder order=SortOrder.values()[sortCount % 2];
  List<RowSorter.SortKey> sortKeys=new ArrayList<>();
  if (columnIndex != 0) {
    sortKeys.add(new RowSorter.SortKey(0,SortOrder.DESCENDING));
  }
  sortKeys.add(new RowSorter.SortKey(columnIndex,order));
  sorter.setSortKeys(sortKeys);
  this.sortCount=sortCount;
  sortedColumn=columnIndex;
}

private void sort ( int columnIndex , int sortCount ) { SortOrder order = SortOrder . values ( ) [ sortCount % 2 ] ; List < RowSorter . SortKey > sortKeys = new ArrayList < > ( ) ; if ( columnIndex != 0 ) { sortKeys . add ( new RowSorter . SortKey ( 0 , SortOrder . DESCENDING ) ) ; } sortKeys . add ( new RowSorter . SortKey ( columnIndex , order ) ) ; sorter . setSortKeys ( sortKeys ) ; this . sortCount = sortCount ; sortedColumn = columnIndex ; }
sorts the given column with the given sortcount , which indicates the sort order .
