IT. Expert System.

Java Standard Edition (SE)

DefaultRowSorter.ModelWrapper


javax.swing

Class DefaultRowSorter.ModelWrapper<M,I>

  • Type Parameters:
    M - the type of the underlying model
    I - the identifier supplied to the filter
    Enclosing class:
    DefaultRowSorter<M,I>


    protected abstract static class DefaultRowSorter.ModelWrapper<M,I>
    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.

    Since:
    1.6
    See Also:
    RowFilter, RowFilter.Entry
    • Constructor Detail

      • ModelWrapper

        protected ModelWrapper()
        Creates a new ModelWrapper.
    • Method Detail

      • getModel

        public abstract M getModel()
        Returns the underlying model that this Model is wrapping.
        Returns:
        the underlying model
      • getColumnCount

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

        public abstract int getRowCount()
        Returns the number of rows in the model.
        Returns:
        the number of rows in the model
      • 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
        Throws:
        IndexOutOfBoundsException - if the indices are outside the range of 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
        Throws:
        IndexOutOfBoundsException - if the indices are outside the range of the model
      • getIdentifier

        public abstract I 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
        See Also:
        RowFilter.Entry.getIdentifier()


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 359 / 158798880. Delta: 0.04285 с