public class StarTableColumn
extends javax.swing.table.TableColumn
TableColumn
representing a column
in a StarJTable
.
This simple extension to TableColumn
provides a constructor
and an accessor which reference the
ColumnInfo
object
associated with a table column. The renderers and column headings etc
used by this column are based by default on the characteristics of
the associated ColumnInfo
.Constructor and Description |
---|
StarTableColumn(ColumnInfo colinfo)
Constructs a
StarTableColumn from a ColumnInfo
object using a default model index of 0. |
StarTableColumn(ColumnInfo colinfo,
int modelIndex)
Constructs a
StarTableColumn from a ColumnInfo
object with a given model index. |
Modifier and Type | Method and Description |
---|---|
static javax.swing.table.TableCellEditor |
createCellEditor(ValueInfo info)
Utility method to create a table cell editor suitable for a given
value info.
|
static javax.swing.table.TableCellRenderer |
createCellRenderer(ValueInfo info)
Utility method to create a table cell renderer suitable for a given
value info.
|
ColumnInfo |
getColumnInfo()
Returns the
ColumnInfo object associated with this column. |
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
public StarTableColumn(ColumnInfo colinfo, int modelIndex)
StarTableColumn
from a ColumnInfo
object with a given model index.colinfo
- the ColumnInfo
object which supplies the
characteristics of this columnmodelIndex
- the index of the column in the
TableModel
which will be displayed by this columnpublic StarTableColumn(ColumnInfo colinfo)
StarTableColumn
from a ColumnInfo
object using a default model index of 0.colinfo
- the ColumnInfo
object which supplies the
characteristics of this columnpublic ColumnInfo getColumnInfo()
ColumnInfo
object associated with this column.public static javax.swing.table.TableCellRenderer createCellRenderer(ValueInfo info)
info
- metadata describing table cell contentspublic static javax.swing.table.TableCellEditor createCellEditor(ValueInfo info)
info
- metadata describing table cell contents