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 Summary
Nested Classes -
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTableModel(ValueModel rowsModel) DefaultTableModel(ValueModel rowsModel, ValueModel rowModel) -
Method Summary
Modifier 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.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Constructor Details
-
DefaultTableModel
-
DefaultTableModel
-
-
Method Details
-
getColumnList
- Returns:
- the column definitions.
-
getColumnModel
-
addPropertyColumn
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 -
addClosureColumn
public DefaultTableColumn addClosureColumn(Object headerValue, Closure readClosure, Closure writeClosure, Class type) Adds a closure based column to the table -
addColumn
-
addColumn
public DefaultTableColumn addColumn(Object headerValue, Object identifier, ValueModel columnValueModel) -
addColumn
Adds a new column definition to the table -
removeColumn
Removes a column definition from the table -
getRowCount
public int getRowCount() -
getColumnCount
public int getColumnCount() -
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) - Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getValueAt
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
getColumnModel
-
getRows
-
getRowModel
-
getRowsModel
-