Package groovy.swing.model
Class DefaultTableColumn
java.lang.Object
javax.swing.table.TableColumn
groovy.swing.model.DefaultTableColumn
- All Implemented Interfaces:
Serializable
A
TableColumn backed by a ValueModel for reading and writing cell values.- See Also:
-
Field Summary
Fields inherited from class javax.swing.table.TableColumn
CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, COLUMN_WIDTH_PROPERTY, HEADER_RENDERER_PROPERTY, HEADER_VALUE_PROPERTY, headerRenderer, headerValue, identifier, isResizable, maxWidth, minWidth, modelIndex, resizedPostingDisableCount, width -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTableColumn(ValueModel valueModel) Creates a column backed by the supplied value model.DefaultTableColumn(Object header, ValueModel valueModel) Creates a column with a header value and backing value model.DefaultTableColumn(Object headerValue, Object identifier, ValueModel columnValueModel) Creates a column with header and identifier values. -
Method Summary
Methods inherited from class javax.swing.table.TableColumn
addPropertyChangeListener, createDefaultHeaderRenderer, disableResizedPosting, enableResizedPosting, getCellEditor, getCellRenderer, getHeaderRenderer, getHeaderValue, getIdentifier, getMaxWidth, getMinWidth, getModelIndex, getPreferredWidth, getPropertyChangeListeners, getResizable, getWidth, removePropertyChangeListener, setCellEditor, setCellRenderer, setHeaderRenderer, setHeaderValue, setIdentifier, setMaxWidth, setMinWidth, setModelIndex, setPreferredWidth, setResizable, setWidth, sizeWidthToFit
-
Constructor Details
-
DefaultTableColumn
Creates a column backed by the supplied value model.- Parameters:
valueModel- the value model used to access cell values
-
DefaultTableColumn
Creates a column with a header value and backing value model.- Parameters:
header- the column header valuevalueModel- the value model used to access cell values
-
DefaultTableColumn
Creates a column with header and identifier values.- Parameters:
headerValue- the column header valueidentifier- the logical identifier for the columncolumnValueModel- the value model used to access cell values
-
-
Method Details
-
toString
Returns a debug-friendly description of this column and its backing value model. -
getValue
Evaluates the value of a cell- Parameters:
row- the row of interestrowIndex- the index of the row of interestcolumnIndex- the column of interest- Returns:
- the value
-
setValue
Writes a cell value through the backing value model.- Parameters:
row- the row object that owns the valuevalue- the new cell valuerowIndex- the source row indexcolumnIndex- the source column index
-
getType
- Returns:
- the column type
-
getValueModel
Returns the value model used by this column.- Returns:
- the backing value model
-