groovy.model

## Class DefaultTableModel

- java.lang.Object
- - javax.swing.table.AbstractTableModel
  - - groovy.model.DefaultTableModel

All Implemented Interfaces:
  java.io.Serializable, javax.swing.table.TableModel

    public class DefaultTableModel
    extends javax.swing.table.AbstractTableModel

A default table model made up of PropertyModels on a Value model.

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`protected static class` `DefaultTableModel.MyTableColumnModel`

### Field Summary

### Fields inherited from class javax.swing.table.AbstractTableModel

`listenerList`

### Constructor Summary

Constructors
Constructor and Description
`DefaultTableModel(ValueModel rowsModel)`
`DefaultTableModel(ValueModel rowsModel, ValueModel rowModel)`

### Method Summary

Methods
`DefaultTableColumn` `addClosureColumn(java.lang.Object headerValue, Closure readClosure, Closure writeClosure, java.lang.Class type)` Adds a closure based column to the table
`void` `addColumn(DefaultTableColumn column)` Adds a new column definition to the table
`DefaultTableColumn` `addColumn(java.lang.Object headerValue, java.lang.Object identifier, ValueModel columnValueModel)`
`DefaultTableColumn` `addColumn(java.lang.Object headerValue, ValueModel columnValueModel)`
`DefaultTableColumn` `addPropertyColumn(java.lang.Object headerValue, java.lang.String property, java.lang.Class type)` Adds a property model column to the table
`DefaultTableColumn` `addPropertyColumn(java.lang.Object headerValue, java.lang.String property, java.lang.Class type, boolean editable)` Adds a property model column to the table
`java.lang.Class` `getColumnClass(int columnIndex)`
`int` `getColumnCount()`
`java.util.List` `getColumnList()`
`javax.swing.table.TableColumnModel` `getColumnModel()`
`protected ValueModel` `getColumnModel(int columnIndex)`
`java.lang.String` `getColumnName(int columnIndex)`
`int` `getRowCount()`
`ValueModel` `getRowModel()`
`protected java.util.List` `getRows()`
`ValueModel` `getRowsModel()`
`java.lang.Object` `getValueAt(int rowIndex, int columnIndex)`
`boolean` `isCellEditable(int rowIndex, int columnIndex)`
`void` `removeColumn(DefaultTableColumn column)` Removes a column definition from the table
`void` `setValueAt(java.lang.Object value, int rowIndex, int columnIndex)`

### Methods inherited from class javax.swing.table.AbstractTableModel

`addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultTableModel

    public DefaultTableModel(ValueModel rowsModel)

#### DefaultTableModel

    public DefaultTableModel(ValueModel rowsModel,
                     ValueModel rowModel)

### Method Detail

#### getColumnList

    public java.util.List getColumnList()

Returns:
  the column definitions.

#### getColumnModel

    public javax.swing.table.TableColumnModel getColumnModel()

#### addPropertyColumn

    public DefaultTableColumn addPropertyColumn(java.lang.Object headerValue,
                                       java.lang.String property,
                                       java.lang.Class type)

Adds a property model column to the table

#### addPropertyColumn

    public DefaultTableColumn addPropertyColumn(java.lang.Object headerValue,
                                       java.lang.String property,
                                       java.lang.Class type,
                                       boolean editable)

Adds a property model column to the table

#### addClosureColumn

    public DefaultTableColumn addClosureColumn(java.lang.Object headerValue,
                                      Closure readClosure,
                                      Closure writeClosure,
                                      java.lang.Class type)

Adds a closure based column to the table

#### addColumn

    public DefaultTableColumn addColumn(java.lang.Object headerValue,
                               ValueModel columnValueModel)

#### addColumn

    public DefaultTableColumn addColumn(java.lang.Object headerValue,
                               java.lang.Object identifier,
                               ValueModel columnValueModel)

#### addColumn

    public void addColumn(DefaultTableColumn column)

Adds a new column definition to the table

#### removeColumn

    public void removeColumn(DefaultTableColumn column)

Removes a column definition from the table

#### getRowCount

    public int getRowCount()

#### getColumnCount

    public int getColumnCount()

#### getColumnName

    public java.lang.String getColumnName(int columnIndex)

Specified by:
  `getColumnName` in interface `javax.swing.table.TableModel`
Overrides:
  `getColumnName` in class `javax.swing.table.AbstractTableModel`

#### getColumnClass

    public java.lang.Class getColumnClass(int columnIndex)

Specified by:
  `getColumnClass` in interface `javax.swing.table.TableModel`
Overrides:
  `getColumnClass` in class `javax.swing.table.AbstractTableModel`

#### isCellEditable

    public boolean isCellEditable(int rowIndex,
                         int columnIndex)

Specified by:
  `isCellEditable` in interface `javax.swing.table.TableModel`
Overrides:
  `isCellEditable` in class `javax.swing.table.AbstractTableModel`

#### getValueAt

    public java.lang.Object getValueAt(int rowIndex,
                              int columnIndex)

#### setValueAt

    public void setValueAt(java.lang.Object value,
                  int rowIndex,
                  int columnIndex)

Specified by:
  `setValueAt` in interface `javax.swing.table.TableModel`
Overrides:
  `setValueAt` in class `javax.swing.table.AbstractTableModel`

#### getColumnModel

    protected ValueModel getColumnModel(int columnIndex)

#### getRows

    protected java.util.List getRows()

#### getRowModel

    public ValueModel getRowModel()

#### getRowsModel

    public ValueModel getRowsModel()