List of usage examples for javax.swing SortOrder DESCENDING
SortOrder DESCENDING
To view the source code for javax.swing SortOrder DESCENDING.
Click Source Link
From source file:org.nuclos.client.ui.collect.model.SortableCollectableTableModelImpl.java
/** * addititional Method for restoring the sorting order without fireing any changes etc. * needed for the WYSIWYG Editor.//from w ww .j a va 2 s.c o m * @param iSortedColumn * @param bSortedAscending * @deprecated refactor to use regular setSortKeys */ @Deprecated public void restoreSortingOrder(int iSortedColumn, boolean bSortedAscending) { if (!(iSortedColumn >= -1 && iSortedColumn < this.getColumnCount())) { throw new IllegalArgumentException("iSortedColumn"); } this.sortKeys = Collections.singletonList( new SortKey(iSortedColumn, bSortedAscending ? SortOrder.ASCENDING : SortOrder.DESCENDING)); }
From source file:sms.ViewResults.java
private void sorter(int column) { TableRowSorter<TableModel> sorter = new TableRowSorter<>(table.getModel()); table.setRowSorter(sorter);//from ww w .ja va 2 s. c o m List<RowSorter.SortKey> sortKey = new ArrayList<>(); int colToSort = column; sortKey.add(new RowSorter.SortKey(colToSort, SortOrder.DESCENDING)); sorter.setSortKeys(sortKey); sorter.sort(); }