Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.10
| 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 AbstractTableModel

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

Authors:
  James Strachan

Version:
  \$Revision: 12913 \$

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

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

Method Summary
`DefaultTableColumn` | `addClosureColumn(Object headerValue, Closure readClosure, Closure writeClosure, Class type)` Adds a closure based column to the table
`DefaultTableColumn` | `addColumn(Object headerValue, ValueModel columnValueModel)`
`DefaultTableColumn` | `addColumn(Object headerValue, Object identifier, ValueModel columnValueModel)`
`void` | `addColumn(DefaultTableColumn column)` Adds a new column definition to the table
`DefaultTableColumn` | `addPropertyColumn(Object headerValue, String property, Class type)` Adds a property model column to the table
`DefaultTableColumn` | `addPropertyColumn(Object headerValue, String property, Class type, boolean editable)` Adds a property model column to the table
`Class` | `getColumnClass(int columnIndex)`
`int` | `getColumnCount()`
`List` | `getColumnList()` @return the column definitions.
`TableColumnModel` | `getColumnModel()`
`protected ValueModel` | `getColumnModel(int columnIndex)`
`String` | `getColumnName(int columnIndex)`
`int` | `getRowCount()`
`ValueModel` | `getRowModel()`
`protected List` | `getRows()`
`ValueModel` | `getRowsModel()`
`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(Object value, int rowIndex, int columnIndex)`

Methods inherited from class AbstractTableModel
getListeners, addTableModelListener, getColumnClass, getColumnName, isCellEditable, removeTableModelListener, setValueAt, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getTableModelListeners, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll, getColumnCount, getRowCount, getValueAt

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Constructor Detail

### DefaultTableModel

    public DefaultTableModel(ValueModel rowsModel)

### DefaultTableModel

    public DefaultTableModel(ValueModel rowsModel, ValueModel rowModel)

Method Detail

### addClosureColumn

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

  Adds a closure based column to the table

### addColumn

    public DefaultTableColumn addColumn(Object headerValue, ValueModel columnValueModel)

### addColumn

    public DefaultTableColumn addColumn(Object headerValue, Object identifier, ValueModel columnValueModel)

### addColumn

    public void addColumn(DefaultTableColumn column)

  Adds a new column definition to the table

### addPropertyColumn

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

  Adds a property model column to the table

### addPropertyColumn

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

  Adds a property model column to the table

### getColumnClass

    public Class getColumnClass(int columnIndex)

### getColumnCount

    public int getColumnCount()

### getColumnList

    public List getColumnList()

  Returns:
    the column definitions.

### getColumnModel

    public TableColumnModel getColumnModel()

### getColumnModel

    protected ValueModel getColumnModel(int columnIndex)

### getColumnName

    public String getColumnName(int columnIndex)

### getRowCount

    public int getRowCount()

### getRowModel

    public ValueModel getRowModel()

### getRows

    protected List getRows()

### getRowsModel

    public ValueModel getRowsModel()

### getValueAt

    public 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(Object value, int rowIndex, int columnIndex)

Copyright © 2003-2010 The Codehaus. All rights reserved.