Package: groovy.swing.model

## [Java] Class DefaultTableColumn

- groovy.swing.model.DefaultTableColumn

-     public class DefaultTableColumn
      extends TableColumn

  A TableColumn backed by a ValueModel for reading and writing cell values.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class TableColumn` | `COLUMN_WIDTH_PROPERTY, HEADER_VALUE_PROPERTY, HEADER_RENDERER_PROPERTY, CELL_RENDERER_PROPERTY`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `DefaultTableColumn(ValueModel valueModel)` Creates a column backed by the supplied value model.
    `DefaultTableColumn(Object header, ValueModel valueModel)` Creates a column with a header value and backing value model.
    `DefaultTableColumn(Object headerValue, Object identifier, ValueModel columnValueModel)` Creates a column with header and identifier values.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Class` | `getType()` Returns: the column type
    `` | `public Object` | `getValue(Object row, int rowIndex, int columnIndex)` Evaluates the value of a cell
    `` | `public ValueModel` | `getValueModel()` Returns the value model used by this column.
    `` | `public void` | `setValue(Object row, Object value, int rowIndex, int columnIndex)` Writes a cell value through the backing value model.
    `` | `public String` | `toString()` Returns a debug-friendly description of this column and its backing value model.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class TableColumn` | `addPropertyChangeListener, disableResizedPosting, enableResizedPosting, equals, getCellEditor, getCellRenderer, getClass, getHeaderRenderer, getHeaderValue, getIdentifier, getMaxWidth, getMinWidth, getModelIndex, getPreferredWidth, getPropertyChangeListeners, getResizable, getWidth, hashCode, notify, notifyAll, removePropertyChangeListener, setCellEditor, setCellRenderer, setHeaderRenderer, setHeaderValue, setIdentifier, setMaxWidth, setMinWidth, setModelIndex, setPreferredWidth, setResizable, setWidth, sizeWidthToFit, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public DefaultTableColumn(ValueModel valueModel)

      Creates a column backed by the supplied value model.

      Parameters:
        `valueModel` - the value model used to access cell values

    - #### public DefaultTableColumn(Object header, ValueModel valueModel)

      Creates a column with a header value and backing value model.

      Parameters:
        `header` - the column header value
        `valueModel` - the value model used to access cell values

    - #### public DefaultTableColumn(Object headerValue, Object identifier, ValueModel columnValueModel)

      Creates a column with header and identifier values.

      Parameters:
        `headerValue` - the column header value
        `identifier` - the logical identifier for the column
        `columnValueModel` - the value model used to access cell values

  - ### Method Detail

    - #### public Class getType()

      Returns:
        the column type

    - #### public Object getValue(Object row, int rowIndex, int columnIndex)

      Evaluates the value of a cell

      Returns:
        the value
      Parameters:
        `row` - the row of interest
        `rowIndex` - the index of the row of interest
        `columnIndex` - the column of interest

    - #### public ValueModel getValueModel()

      Returns the value model used by this column.

      Returns:
        the backing value model

    - #### public void setValue(Object row, Object value, int rowIndex, int columnIndex)

      Writes a cell value through the backing value model.

      Parameters:
        `row` - the row object that owns the value
        `value` - the new cell value
        `rowIndex` - the source row index
        `columnIndex` - the source column index

    - #### public String toString()

      Returns a debug-friendly description of this column and its backing value model.

      Returns:
        the column description