Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.model
[Java] Class DefaultTableModel

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

    public class DefaultTableModel
    extends javax.swing.table.AbstractTableModel

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

Authors:
  James Strachan

Version:
  \$Revision\$

Nested Class Summary
`protected static class` | `DefaultTableModel.MyTableColumnModel`

Constructor Summary
`DefaultTableModel(ValueModel rowsModel)`
`DefaultTableModel(ValueModel rowsModel, ValueModel rowModel)`

Method Summary
`DefaultTableColumn` | `addClosureColumn(java.lang.Object headerValue, Closure readClosure, Closure writeClosure, java.lang.Class type)` Adds a closure based column to the table
`DefaultTableColumn` | `addColumn(java.lang.Object headerValue, ValueModel columnValueModel)`
`DefaultTableColumn` | `addColumn(java.lang.Object headerValue, java.lang.Object identifier, ValueModel columnValueModel)`
`void` | `addColumn(DefaultTableColumn column)` Adds a new column definition to the table
`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()` @return the column definitions.
`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
javax.swing.table.AbstractTableModel#getListeners(java.lang.Class), javax.swing.table.AbstractTableModel#setValueAt(java.lang.Object, int, int), javax.swing.table.AbstractTableModel#getColumnName(int), javax.swing.table.AbstractTableModel#getColumnClass(int), javax.swing.table.AbstractTableModel#isCellEditable(int, int), javax.swing.table.AbstractTableModel#addTableModelListener(javax.swing.event.TableModelListener), javax.swing.table.AbstractTableModel#removeTableModelListener(javax.swing.event.TableModelListener), javax.swing.table.AbstractTableModel#fireTableStructureChanged(), javax.swing.table.AbstractTableModel#fireTableChanged(javax.swing.event.TableModelEvent), javax.swing.table.AbstractTableModel#fireTableRowsDeleted(int, int), javax.swing.table.AbstractTableModel#fireTableRowsInserted(int, int), javax.swing.table.AbstractTableModel#fireTableRowsUpdated(int, int), javax.swing.table.AbstractTableModel#fireTableCellUpdated(int, int), javax.swing.table.AbstractTableModel#findColumn(java.lang.String), javax.swing.table.AbstractTableModel#getTableModelListeners(), javax.swing.table.AbstractTableModel#fireTableDataChanged(), javax.swing.table.AbstractTableModel#wait(long), javax.swing.table.AbstractTableModel#wait(long, int), javax.swing.table.AbstractTableModel#wait(), javax.swing.table.AbstractTableModel#equals(java.lang.Object), javax.swing.table.AbstractTableModel#toString(), javax.swing.table.AbstractTableModel#hashCode(), javax.swing.table.AbstractTableModel#getClass(), javax.swing.table.AbstractTableModel#notify(), javax.swing.table.AbstractTableModel#notifyAll(), javax.swing.table.AbstractTableModel#getValueAt(int, int), javax.swing.table.AbstractTableModel#getRowCount(), javax.swing.table.AbstractTableModel#getColumnCount()

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### DefaultTableModel

    public DefaultTableModel(ValueModel rowsModel)

### DefaultTableModel

    public DefaultTableModel(ValueModel rowsModel, ValueModel rowModel)

Method Detail

### 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

### 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

### getColumnClass

    public java.lang.Class getColumnClass(int columnIndex)

### getColumnCount

    public int getColumnCount()

### getColumnList

    public java.util.List getColumnList()

  Returns:
    the column definitions.

### getColumnModel

    public javax.swing.table.TableColumnModel getColumnModel()

### getColumnModel

    protected ValueModel getColumnModel(int columnIndex)

### getColumnName

    public java.lang.String getColumnName(int columnIndex)

### getRowCount

    public int getRowCount()

### getRowModel

    public ValueModel getRowModel()

### getRows

    protected java.util.List getRows()

### getRowsModel

    public ValueModel getRowsModel()

### getValueAt

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

### isCellEditable

    public boolean isCellEditable(int rowIndex, int columnIndex)

### removeColumn

    public void removeColumn(DefaultTableColumn column)

  Removes a column definition from the table

### setValueAt

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

Groovy Documentation