API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing. DefaultRowSorter View Source
Author(s)
Since
1.6
Version
1.20 06/23/06
Serial
Hierarchy
 Object
      RowSorter
          DefaultRowSorter
Implements
Subclasses
Description
publicabstract abstract class DefaultRowSorter
  An implementation of RowSorter that provides sorting and filtering around a grid-based data model.
Constructors
public DefaultRowSorter ()
Creates an empty DefaultRowSorter.
Methods
Hide/Show inherited methods
public void addRowSorterListener (RowSorterListener l) [Inherited From RowSorter]
  Adds a RowSorterListener to receive notification about this RowSorter.
public void allRowsChanged () [Specified in RowSorter]
  Invoked when the contents of the underlying model have completely changed.
public int convertRowIndexToModel (int index) [Specified in RowSorter]
  Returns the location of index in terms of the underlying model.
public int convertRowIndexToView (int index) [Specified in RowSorter]
  Returns the location of index in terms of the view.
protected void fireRowSorterChanged (int[] lastRowIndexToModel) [Inherited From RowSorter]
  Notifies listener that the mapping has changed.
pack-private void fireRowSorterChanged (RowSorterEvent event) [Inherited From RowSorter]
protected void fireSortOrderChanged () [Inherited From RowSorter]
Notifies listener that the sort order has changed.
public Comparator<Object> getComparator (int column)
  Returns the Comparator for the specified column.
public int getMaxSortKeys ()
  Returns the maximum number of sort keys.
publicfinal M getModel () [Specified in RowSorter]
  Returns the underlying model.
public int getModelRowCount () [Specified in RowSorter]
Returns the number of rows in the underlying model.
protectedfinal ModelWrapper< M, I> getModelWrapper ()
  Returns the model wrapper providing the data that is being sorted and filtered.
public RowFilter<Object, Object> getRowFilter ()
  Returns the filter that determines which rows, if any, should be hidden from view.
public List<SortKey> getSortKeys () [Specified in RowSorter]
  Returns the current sort keys.
public boolean getSortsOnUpdates ()
  Returns true if a sort should happen when the underlying model is updated; otherwise, returns false.
public int getViewRowCount () [Specified in RowSorter]
  Returns the number of rows in the view.
public boolean isSortable (int column)
  Returns true if the specified column is sortable; otherwise, false.
public void modelStructureChanged () [Specified in RowSorter]
  Invoked when the underlying model structure has completely changed.
public void removeRowSorterListener (RowSorterListener l) [Inherited From RowSorter]
  Removes a RowSorterListener.
public void rowsDeleted (int firstRow, int endRow) [Specified in RowSorter]
  Invoked when rows have been deleted from the underlying model in the specified range (inclusive).
public void rowsInserted (int firstRow, int endRow) [Specified in RowSorter]
  Invoked when rows have been inserted into the underlying model in the specified range (inclusive).
public void rowsUpdated (int firstRow, int endRow) [Specified in RowSorter]
  Invoked when rows have been changed in the underlying model between the specified range (inclusive).
public void rowsUpdated (int firstRow, int endRow, int column) [Specified in RowSorter]
  Invoked when the column in the rows have been updated in the underlying model between the specified range.
public void setComparator (int column, Comparator<Object> comparator)
  Sets the Comparator to use when sorting the specified column.
public void setMaxSortKeys (int max)
  Sets the maximum number of sort keys.
protectedfinal void setModelWrapper (ModelWrapper< M, I> modelWrapper)
  Sets the model wrapper providing the data that is being sorted and filtered.
public void setRowFilter (RowFilter<Object, Object> filter)
  Sets the filter that determines which rows, if any, should be hidden from the view.
public void setSortable (int column, boolean sortable)
  Sets whether or not the specified column is sortable.
public void setSortKeys (List<SortKey> sortKeys) [Specified in RowSorter]
  Sets the sort keys.
public void setSortsOnUpdates (boolean sortsOnUpdates)
  If true, specifies that a sort should happen when the underlying model is updated (rowsUpdated is invoked).
public void sort ()
  Sorts and filters the rows in the view based on the sort keys of the columns currently being sorted and the filter, if any, associated with this sorter.
public void toggleSortOrder (int column) [Specified in RowSorter]
  Reverses the sort order from ascending to descending (or descending to ascending) if the specified column is already the primary sorted column; otherwise, makes the specified column the primary sorted column, with an ascending sort order.
protected boolean useToString (int column)
  Returns whether or not to convert the value to a string before doing comparisons when sorting.
Fields
Hide/Show inherited fields
Nested Classes
  DefaultRowSorter.ModelWrapper
DefaultRowSorter.ModelWrapper is responsible for providing the data that gets sorted by DefaultRowSorter.
  RowSorter.SortKey
SortKey describes the sort order for a particular column.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar