Package groovy.swing.model
Class DefaultTableModel
- java.lang.Object
- 
- javax.swing.table.AbstractTableModel
- 
- groovy.swing.model.DefaultTableModel
 
 
- 
- All Implemented Interfaces:
- Serializable,- TableModel
 
 public class DefaultTableModel extends AbstractTableModel A default table model made up of PropertyModels on a Value model.- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classDefaultTableModel.MyTableColumnModel
 - 
Field Summary- 
Fields inherited from class javax.swing.table.AbstractTableModellistenerList
 
- 
 - 
Constructor SummaryConstructors Constructor Description DefaultTableModel(ValueModel rowsModel)DefaultTableModel(ValueModel rowsModel, ValueModel rowModel)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultTableColumnaddClosureColumn(Object headerValue, Closure readClosure, Closure writeClosure, Class type)Adds a closure based column to the tablevoidaddColumn(DefaultTableColumn column)Adds a new column definition to the tableDefaultTableColumnaddColumn(Object headerValue, ValueModel columnValueModel)DefaultTableColumnaddColumn(Object headerValue, Object identifier, ValueModel columnValueModel)DefaultTableColumnaddPropertyColumn(Object headerValue, String property, Class type)Adds a property model column to the tableDefaultTableColumnaddPropertyColumn(Object headerValue, String property, Class type, boolean editable)Adds a property model column to the tableClassgetColumnClass(int columnIndex)intgetColumnCount()ListgetColumnList()TableColumnModelgetColumnModel()protected ValueModelgetColumnModel(int columnIndex)StringgetColumnName(int columnIndex)intgetRowCount()ValueModelgetRowModel()protected ListgetRows()ValueModelgetRowsModel()ObjectgetValueAt(int rowIndex, int columnIndex)booleanisCellEditable(int rowIndex, int columnIndex)voidremoveColumn(DefaultTableColumn column)Removes a column definition from the tablevoidsetValueAt(Object value, int rowIndex, int columnIndex)- 
Methods inherited from class javax.swing.table.AbstractTableModeladdTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
- 
 
- 
- 
- 
Constructor Detail- 
DefaultTableModelpublic DefaultTableModel(ValueModel rowsModel) 
 - 
DefaultTableModelpublic DefaultTableModel(ValueModel rowsModel, ValueModel rowModel) 
 
- 
 - 
Method Detail- 
getColumnListpublic List getColumnList() - Returns:
- the column definitions.
 
 - 
getColumnModelpublic TableColumnModel getColumnModel() 
 - 
addPropertyColumnpublic DefaultTableColumn addPropertyColumn(Object headerValue, String property, Class type) Adds a property model column to the table
 - 
addPropertyColumnpublic DefaultTableColumn addPropertyColumn(Object headerValue, String property, Class type, boolean editable) Adds a property model column to the table
 - 
addClosureColumnpublic DefaultTableColumn addClosureColumn(Object headerValue, Closure readClosure, Closure writeClosure, Class type) Adds a closure based column to the table
 - 
addColumnpublic DefaultTableColumn addColumn(Object headerValue, ValueModel columnValueModel) 
 - 
addColumnpublic DefaultTableColumn addColumn(Object headerValue, Object identifier, ValueModel columnValueModel) 
 - 
addColumnpublic void addColumn(DefaultTableColumn column) Adds a new column definition to the table
 - 
removeColumnpublic void removeColumn(DefaultTableColumn column) Removes a column definition from the table
 - 
getRowCountpublic int getRowCount() 
 - 
getColumnCountpublic int getColumnCount() 
 - 
getColumnNamepublic String getColumnName(int columnIndex) - Specified by:
- getColumnNamein interface- TableModel
- Overrides:
- getColumnNamein class- AbstractTableModel
 
 - 
getColumnClasspublic Class getColumnClass(int columnIndex) - Specified by:
- getColumnClassin interface- TableModel
- Overrides:
- getColumnClassin class- AbstractTableModel
 
 - 
isCellEditablepublic boolean isCellEditable(int rowIndex, int columnIndex)- Specified by:
- isCellEditablein interface- TableModel
- Overrides:
- isCellEditablein class- AbstractTableModel
 
 - 
getValueAtpublic Object getValueAt(int rowIndex, int columnIndex) 
 - 
setValueAtpublic void setValueAt(Object value, int rowIndex, int columnIndex) - Specified by:
- setValueAtin interface- TableModel
- Overrides:
- setValueAtin class- AbstractTableModel
 
 - 
getColumnModelprotected ValueModel getColumnModel(int columnIndex) 
 - 
getRowsprotected List getRows() 
 - 
getRowModelpublic ValueModel getRowModel() 
 - 
getRowsModelpublic ValueModel getRowsModel() 
 
- 
 
-