Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdesktop.swingx.sort
Class SortUtils

    java.lang.Object
      org.jdesktop.swingx.sort.SortUtils

    public class SortUtils

extends java.lang.Object

Collection of convenience methods.

Method Summary
`static javax.swing.RowSorter.SortKey` | `getFirstSortingKey(java.util.List<? extends javax.swing.RowSorter.SortKey> keys)` Returns the first SortKey in the list which is sorted.
`static javax.swing.RowSorter.SortKey` | `getFirstSortKeyForColumn(java.util.List<? extends javax.swing.RowSorter.SortKey> keys, int modelColumn)` Returns the first SortKey in the list for the given column, or null if the column has no SortKey.
`static boolean` | `isAscending(javax.swing.SortOrder sortOrder)` Convenience to check for ascending sort order.
`static boolean` | `isSorted(javax.swing.SortOrder sortOrder)`
`static boolean` | `isSorted(javax.swing.SortOrder sortOrder, boolean ascending)`
`static javax.swing.RowSorter.SortKey` | `removeFirstSortKeyForColumn(java.util.List<? extends javax.swing.RowSorter.SortKey> keys, int modelColumn)` Removes and returns the first SortKey in the list for the given column, or null if the column has no SortKey.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getFirstSortingKey

    public static javax.swing.RowSorter.SortKey getFirstSortingKey(java.util.List<? extends javax.swing.RowSorter.SortKey> keys)

  Returns the first SortKey in the list which is sorted. If none is sorted, null is returned.

  Parameters:
    `keys` - a list of SortKeys to search
  Returns:
    the first SortKey which is sorted or null, if no is found.

### getFirstSortKeyForColumn

    public static javax.swing.RowSorter.SortKey getFirstSortKeyForColumn(java.util.List<? extends javax.swing.RowSorter.SortKey> keys,
                                                                         int modelColumn)

  Returns the first SortKey in the list for the given column, or null if the column has no SortKey.

  Parameters:
    `keys` - a list of SortKeys to search
    `modelColumn` - the column index in model coordinates
  Returns:
    the first SortKey for the given column or null if none is found.

### removeFirstSortKeyForColumn

    public static javax.swing.RowSorter.SortKey removeFirstSortKeyForColumn(java.util.List<? extends javax.swing.RowSorter.SortKey> keys,
                                                                            int modelColumn)

  Removes and returns the first SortKey in the list for the given column, or null if the column has no SortKey.

  Parameters:
    `keys` - a list of SortKeys to search
    `modelColumn` - the column index in model coordinates
  Returns:
    the first SortKey for the given column or null if none is found.

### isSorted

    public static boolean isSorted(javax.swing.SortOrder sortOrder)

### isAscending

    public static boolean isAscending(javax.swing.SortOrder sortOrder)

  Convenience to check for ascending sort order. PENDING: is this helpful at all?

  Returns:
    true if ascendingly sorted, false for unsorted/descending.

### isSorted

    public static boolean isSorted(javax.swing.SortOrder sortOrder,
                                   boolean ascending)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010. All Rights Reserved.