Methods Summary |
---|
public void | addRowSorterListener(javax.swing.event.RowSorterListener l)Adds a RowSorterListener to receive notification
about this RowSorter . If the same
listener is added more than once it will receive multiple
notifications. If l is null nothing
is done.
listenerList.add(RowSorterListener.class, l);
|
public abstract void | allRowsChanged()Invoked when the contents of the underlying model have
completely changed. The structure of the table is the same,
only the contents have changed. This is typically sent when it
is too expensive to characterize the change in terms of the
other methods.
You normally do not call this method. This method is public
to allow view classes to call it.
|
public abstract int | convertRowIndexToModel(int index)Returns the location of index in terms of the
underlying model. That is, for the row index in
the coordinates of the view this returns the row index in terms
of the underlying model.
|
public abstract int | convertRowIndexToView(int index)Returns the location of index in terms of the
view. That is, for the row index in the
coordinates of the underlying model this returns the row index
in terms of the view.
|
protected void | fireRowSorterChanged(int[] lastRowIndexToModel)Notifies listener that the mapping has changed.
fireRowSorterChanged(new RowSorterEvent(this,
RowSorterEvent.Type.SORTED, lastRowIndexToModel));
|
void | fireRowSorterChanged(javax.swing.event.RowSorterEvent event)
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == RowSorterListener.class) {
((RowSorterListener)listeners[i + 1]).
sorterChanged(event);
}
}
|
protected void | fireSortOrderChanged()Notifies listener that the sort order has changed.
fireRowSorterChanged(new RowSorterEvent(this));
|
public abstract M | getModel()Returns the underlying model.
|
public abstract int | getModelRowCount()Returns the number of rows in the underlying model.
|
public abstract java.util.List | getSortKeys()Returns the current sort keys. This must return a {@code
non-null List} and may return an unmodifiable {@code List}. If
you need to change the sort keys, make a copy of the returned
{@code List}, mutate the copy and invoke {@code setSortKeys}
with the new list.
|
public abstract int | getViewRowCount()Returns the number of rows in the view. If the contents have
been filtered this might differ from the row count of the
underlying model.
|
public abstract void | modelStructureChanged()Invoked when the underlying model structure has completely
changed. For example, if the number of columns in a
TableModel changed, this method would be invoked.
You normally do not call this method. This method is public
to allow view classes to call it.
|
public void | removeRowSorterListener(javax.swing.event.RowSorterListener l)Removes a RowSorterListener . If
l is null nothing is done.
listenerList.remove(RowSorterListener.class, l);
|
public abstract void | rowsDeleted(int firstRow, int endRow)Invoked when rows have been deleted from the underlying model
in the specified range (inclusive).
The arguments give the indices of the effected range and
are in terms of the model before the change.
For example, if you have a 5-row model and delete 3 items from the end
of the model the indices are 2, 4.
You normally do not call this method. This method is public
to allow view classes to call it.
|
public abstract void | rowsInserted(int firstRow, int endRow)Invoked when rows have been inserted into the underlying model
in the specified range (inclusive).
The arguments give the indices of the effected range.
The first argument is in terms of the model before the change, and
must be less than or equal to the size of the model before the change.
The second argument is in terms of the model after the change and must
be less than the size of the model after the change. For example,
if you have a 5-row model and add 3 items to the end of the model
the indices are 5, 7.
You normally do not call this method. This method is public
to allow view classes to call it.
|
public abstract void | rowsUpdated(int firstRow, int endRow)Invoked when rows have been changed in the underlying model
between the specified range (inclusive).
You normally do not call this method. This method is public
to allow view classes to call it.
|
public abstract void | rowsUpdated(int firstRow, int endRow, int column)Invoked when the column in the rows have been updated in
the underlying model between the specified range.
You normally do not call this method. This method is public
to allow view classes to call it.
|
public abstract void | setSortKeys(java.util.List keys)Sets the current sort keys.
|
public abstract void | toggleSortOrder(int column)Reverses the sort order of the specified column. It is up to
subclasses to provide the exact behavior when invoked. Typically
this will reverse 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. If
the specified column is not sortable, this method has no
effect.
If this results in changing the sort order and sorting, the
appropriate RowSorterListener notification will be
sent.
|