This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing
class DefaultRowSorter.ModelWrapper

java.lang.Object extended by javax.swing.DefaultRowSorter.ModelWrapper
Enclosing class:
DefaultRowSorter

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 Objects and Strings. 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

          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

DefaultRowSorter.ModelWrapper

protected DefaultRowSorter.ModelWrapper()
Creates a new ModelWrapper.

Method Detail

getColumnCount

public abstract int getColumnCount()
Returns the number of columns in the model.

Returns:
the number of columns in the model

getIdentifier

public abstract Object getIdentifier(int row)
Returns the identifier for the specified row. The return value of this is used as the identifier for the RowFilter.Entry that is passed to the RowFilter.

Parameters:
row - the row to return the identifier for, in terms of the underlying model
Returns:
the identifier

getModel

public abstract Object getModel()
Returns the underlying model that this Model is wrapping.

Returns:
the underlying model

getRowCount

public abstract int getRowCount()
Returns the number of rows in the model.

Returns:
the number of rows in the model

getStringValueAt

public String getStringValueAt(int row,
                               int column)
Returns the value as a 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.

Parameters:
row - the row index
column - the column index
Returns:
the value at the specified index as a String

getValueAt

public abstract Object getValueAt(int row,
                                  int column)
Returns the value at the specified index.

Parameters:
row - the row index
column - the column index
Returns:
the value at the specified index


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.