| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
protected abstract static class DefaultRowSorter.ModelWrapper extends Object
DefaultRowSorter.ModelWrapper
is responsible for providing
the data that gets sorted by DefaultRowSorter
. You
normally do not interact directly with ModelWrapper
.
Subclasses of DefaultRowSorter
provide an
implementation of ModelWrapper
wrapping another model.
For example,
TableRowSorter
provides a ModelWrapper
that
wraps a TableModel
.
ModelWrapper
makes a distinction between values as
Object
s and String
s. This allows
implementations to provide a custom string
converter to be used instead of invoking toString
on the
object.
Constructor Summary | |
---|---|
protected |
Creates a new ModelWrapper .
|
Method Summary | |
---|---|
abstract int |
Returns the number of columns in the model. |
abstract Object |
getIdentifier(int row) Returns the identifier for the specified row. |
abstract Object |
getModel() Returns the underlying model that this Model is
wrapping.
|
abstract int |
Returns the number of rows in the model. |
String |
getStringValueAt(int row, int column) Returns the value as a String at the specified
index.
|
abstract Object |
getValueAt(int row, int column) Returns the value at the specified index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DefaultRowSorter.ModelWrapper()
ModelWrapper
.
Method Detail |
---|
public abstract int getColumnCount()
public abstract Object getIdentifier(int row)
RowFilter.Entry
that is passed to the
RowFilter
.
row
- the row to return the identifier for, in terms of
the underlying modelpublic abstract Object getModel()
Model
is
wrapping.
public abstract int getRowCount()
public String getStringValueAt(int row, int column)
String
at the specified
index. This implementation uses toString
on
the result from getValueAt
(making sure
to return an empty string for null values). Subclasses that
override this method should never return null.
row
- the row indexcolumn
- the column indexString
public abstract Object getValueAt(int row, int column)
row
- the row indexcolumn
- the column index
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |