Holger's Java API

## com.antelmann.util.table
Class TableModelRenderer

    java.lang.Object
      com.antelmann.util.table.TableModelRenderer

All Implemented Interfaces:
  Wrapped<TableCellRenderer>, TableCellRenderer

    public class TableModelRenderer

extends Object
implements TableCellRenderer, Wrapped<TableCellRenderer>

allows to delegate the rendering of table columns to the model if applicable

Since:
  10.08.2010, 16:37:52
Author:
  Holger Antelmann

Constructor Summary
`TableModelRenderer()`
`TableModelRenderer(TableCellRenderer defaultRenderer)`

Method Summary
`Component` `getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)` checks whether the model of the table implements `TableCellRenderer` (while also checking for embedded functionality via `Wrapped`) and returns that value if found; otherwise, the given default renderer is utilized.
`TableCellRenderer` `unwrap()` returns the embedded instance that this wrapper encloses

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

Constructor Detail

### TableModelRenderer

    public TableModelRenderer()

### TableModelRenderer

    public TableModelRenderer(TableCellRenderer defaultRenderer)

Method Detail

### getTableCellRendererComponent

    public Component getTableCellRendererComponent(JTable table,
                                                   Object value,
                                                   boolean isSelected,
                                                   boolean hasFocus,
                                                   int row,
                                                   int column)

  checks whether the model of the table implements `TableCellRenderer` (while also checking for embedded functionality via `Wrapped`) and returns that value if found; otherwise, the given default renderer is utilized.

  Specified by:
    `getTableCellRendererComponent` in interface `TableCellRenderer`

### unwrap

    public TableCellRenderer unwrap()

  Description copied from interface: `Wrapped`
  returns the embedded instance that this wrapper encloses

  Specified by:
    `unwrap` in interface `Wrapped<TableCellRenderer>`

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