Holger's Java API

## com.antelmann.util.table
Class ConvertedTableModel

    java.lang.Object
      com.antelmann.util.table.TableModelWrapper
          com.antelmann.util.table.ConvertedTableModel

All Implemented Interfaces:
  EditableComponent, TableCustomizer, Wrapped<TableModel>, TableModel

    public class ConvertedTableModel

extends TableModelWrapper

a special model that allows converting the values before setting/getting a cell value. All methods that implement TableModel directly delegate to the embedded model, while `getValueAt(int, int)` and `setValueAt(Object, int, int)` use the Converter instance.

Author:
  Holger Antelmann

Field Summary

Fields inherited from class com.antelmann.util.table.TableModelWrapper
`DATE_CONVERTER`

Constructor Summary
`ConvertedTableModel(TableModel model, Converter<Object,Object> converter)`
`ConvertedTableModel(TableModel model, Processor<Object,?> processor)`

Method Summary
`Converter<Object,Object>` `getConverter()`
`Object` `getValueAt(int rowIndex, int columnIndex)`
`void` `setValueAt(Object value, int rowIndex, int columnIndex)`

Methods inherited from class com.antelmann.util.table.TableModelWrapper
`addTableModelListener, applyStyle, applyStyleFor, getColumnClass, getColumnCount, getColumnName, getRowCount, isCellEditable, isEditable, removeTableModelListener, setColumnClass, setColumnClass, setColumnClassBasedOnRow, setConverter, setConverter, setConverter, setConverter, setEditable, setEditor, setEditor, setReadOnly, setRenderer, setRenderer, unwrap, wrap`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConvertedTableModel

    public ConvertedTableModel(TableModel model,
                               Processor<Object,?> processor)

### ConvertedTableModel

    public ConvertedTableModel(TableModel model,
                               Converter<Object,Object> converter)

Method Detail

### getConverter

    public Converter<Object,Object> getConverter()

### getValueAt

    public Object getValueAt(int rowIndex,
                             int columnIndex)

  Specified by:
    `getValueAt` in interface `TableModel`
  Overrides:
    `getValueAt` in class `TableModelWrapper`

### setValueAt

    public void setValueAt(Object value,
                           int rowIndex,
                           int columnIndex)

  Specified by:
    `setValueAt` in interface `TableModel`
  Overrides:
    `setValueAt` in class `TableModelWrapper`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads