groovy.model
Class DefaultTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
groovy.model.DefaultTableModel
- All Implemented Interfaces:
- Serializable, TableModel
- public class DefaultTableModel
- extends AbstractTableModel
A default table model made up of PropertyModels on a Value model.
- Version:
- $Revision: 1.2 $
- Author:
- James Strachan
- See Also:
- Serialized Form
Method Summary |
DefaultTableColumn |
addClosureColumn(Object headerValue,
Closure readClosure,
Closure writeClosure,
Class type)
Adds a closure based column to the table |
void |
addColumn(DefaultTableColumn column)
Adds a new column definition to the table |
DefaultTableColumn |
addColumn(Object headerValue,
ValueModel columnValueModel)
|
DefaultTableColumn |
addPropertyColumn(Object headerValue,
String property,
Class type)
Adds a property model column to the table |
Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
List |
getColumnList()
|
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 javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultTableModel
public DefaultTableModel(ValueModel rowsModel)
DefaultTableModel
public DefaultTableModel(ValueModel rowsModel,
ValueModel rowModel)
getColumnList
public List getColumnList()
- Returns:
- the column definitions.
getColumnModel
public TableColumnModel getColumnModel()
addPropertyColumn
public DefaultTableColumn addPropertyColumn(Object headerValue,
String property,
Class type)
- 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
public DefaultTableColumn addColumn(Object headerValue,
ValueModel columnValueModel)
addColumn
public void addColumn(DefaultTableColumn column)
- Adds a new column definition to the table
removeColumn
public void removeColumn(DefaultTableColumn column)
- Removes a column definition from the table
getRowCount
public int getRowCount()
getColumnCount
public int getColumnCount()
getColumnName
public String getColumnName(int columnIndex)
getColumnClass
public Class getColumnClass(int columnIndex)
isCellEditable
public boolean isCellEditable(int rowIndex,
int columnIndex)
getValueAt
public Object getValueAt(int rowIndex,
int columnIndex)
setValueAt
public void setValueAt(Object value,
int rowIndex,
int columnIndex)
getColumnModel
protected ValueModel getColumnModel(int columnIndex)
getRows
protected List getRows()
getRowModel
public ValueModel getRowModel()
getRowsModel
public ValueModel getRowsModel()
Copyright © 2003-2007 The Codehaus. All Rights Reserved.