API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.table. TableRowSorter View Source
Author(s)
Since
1.6
Version
1.8 03/31/06
Serial
Hierarchy
 Object
      RowSorter
          DefaultRowSorter
              TableRowSorter
Implements
Subclasses
Description
public class TableRowSorter
  An implementation of RowSorter that provides sorting and filtering using a TableModel.
Constructors
public TableRowSorter ()
Creates a TableRowSorter with an empty model.
public TableRowSorter ( M model)
  Creates a TableRowSorter using model as the underlying TableModel.
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 () [Inherited From DefaultRowSorter] [Specified in RowSorter]
  Invoked when the contents of the underlying model have completely changed.
public int convertRowIndexToModel (int index) [Inherited From DefaultRowSorter] [Specified in RowSorter]
  Returns the location of index in terms of the underlying model.
public int convertRowIndexToView (int index) [Inherited From DefaultRowSorter] [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.
protected void fireSortOrderChanged () [Inherited From RowSorter]
Notifies listener that the sort order has changed.
public Comparator<Object> getComparator (int column) [Overrides DefaultRowSorter]
  Returns the Comparator for the specified column.
public int getMaxSortKeys () [Inherited From DefaultRowSorter]
  Returns the maximum number of sort keys.
publicfinal M getModel () [Inherited From DefaultRowSorter] [Specified in RowSorter]
  Returns the underlying model.
public int getModelRowCount () [Inherited From DefaultRowSorter] [Specified in RowSorter]
Returns the number of rows in the underlying model.
protectedfinal ModelWrapper< M, I> getModelWrapper () [Inherited From DefaultRowSorter]
  Returns the model wrapper providing the data that is being sorted and filtered.
public RowFilter<Object, Object> getRowFilter () [Inherited From DefaultRowSorter]
  Returns the filter that determines which rows, if any, should be hidden from view.
public List<SortKey> getSortKeys () [Inherited From DefaultRowSorter] [Specified in RowSorter]
  Returns the current sort keys.
public boolean getSortsOnUpdates () [Inherited From DefaultRowSorter]
  Returns true if a sort should happen when the underlying model is updated; otherwise, returns false.
public TableStringConverter getStringConverter ()
  Returns the object responsible for converting values from the model to strings.
public int getViewRowCount () [Inherited From DefaultRowSorter] [Specified in RowSorter]
  Returns the number of rows in the view.
public boolean isSortable (int column) [Inherited From DefaultRowSorter]
  Returns true if the specified column is sortable; otherwise, false.
public void modelStructureChanged () [Inherited From DefaultRowSorter] [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) [Inherited From DefaultRowSorter] [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) [Inherited From DefaultRowSorter] [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) [Inherited From DefaultRowSorter] [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) [Inherited From DefaultRowSorter] [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) [Inherited From DefaultRowSorter]
  Sets the Comparator to use when sorting the specified column.
public void setMaxSortKeys (int max) [Inherited From DefaultRowSorter]
  Sets the maximum number of sort keys.
public void setModel ( M model)
  Sets the TableModel to use as the underlying model for this TableRowSorter.
protectedfinal void setModelWrapper (ModelWrapper< M, I> modelWrapper) [Inherited From DefaultRowSorter]
  Sets the model wrapper providing the data that is being sorted and filtered.
public void setRowFilter (RowFilter<Object, Object> filter) [Inherited From DefaultRowSorter]
  Sets the filter that determines which rows, if any, should be hidden from the view.
public void setSortable (int column, boolean sortable) [Inherited From DefaultRowSorter]
  Sets whether or not the specified column is sortable.
public void setSortKeys (List<SortKey> sortKeys) [Inherited From DefaultRowSorter] [Specified in RowSorter]
  Sets the sort keys.
public void setSortsOnUpdates (boolean sortsOnUpdates) [Inherited From DefaultRowSorter]
  If true, specifies that a sort should happen when the underlying model is updated (rowsUpdated is invoked).
public void setStringConverter (TableStringConverter stringConverter)
  Sets the object responsible for converting values from the model to strings.
public void sort () [Inherited From DefaultRowSorter]
  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) [Inherited From DefaultRowSorter] [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) [Overrides DefaultRowSorter]
  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