Package groovy.swing.model
Class DefaultTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
groovy.swing.model.DefaultTableModel
- All Implemented Interfaces:
- Serializable,- TableModel
A default table model made up of PropertyModels on a Value model.
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields inherited from class javax.swing.table.AbstractTableModellistenerList
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultTableModel(ValueModel rowsModel) DefaultTableModel(ValueModel rowsModel, ValueModel rowModel) 
- 
Method SummaryModifier and TypeMethodDescriptionaddClosureColumn(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 tableaddColumn(Object headerValue, ValueModel columnValueModel) addColumn(Object headerValue, Object identifier, ValueModel columnValueModel) addPropertyColumn(Object headerValue, String property, Class type) Adds a property model column to the tableaddPropertyColumn(Object headerValue, String property, Class type, boolean editable) Adds a property model column to the tablegetColumnClass(int columnIndex) intprotected ValueModelgetColumnModel(int columnIndex) getColumnName(int columnIndex) intprotected ListgetRows()getValueAt(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 Details- 
DefaultTableModel
- 
DefaultTableModel
 
- 
- 
Method Details- 
getColumnList- Returns:
- the column definitions.
 
- 
getColumnModel
- 
addPropertyColumnAdds 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
- 
addColumn
- 
addColumnpublic DefaultTableColumn addColumn(Object headerValue, Object identifier, ValueModel columnValueModel) 
- 
addColumnAdds a new column definition to the table
- 
removeColumnRemoves a column definition from the table
- 
getRowCountpublic int getRowCount()
- 
getColumnCountpublic int getColumnCount()
- 
getColumnName- Specified by:
- getColumnNamein interface- TableModel
- Overrides:
- getColumnNamein class- AbstractTableModel
 
- 
getColumnClass- 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
 
- 
getValueAt
- 
setValueAt- Specified by:
- setValueAtin interface- TableModel
- Overrides:
- setValueAtin class- AbstractTableModel
 
- 
getColumnModel
- 
getRows
- 
getRowModel
- 
getRowsModel
 
-