java.lang.Object
|
+--javax.swing.table.TableColumn
A
TableColumn represents all the attributes of a column in a
JTable, such as width, resizibility, minimum and maximum width.
In addition, the TableColumn provides slots for a renderer and
an editor that can be used to display and edit the values in this column.
It is also possible to specify renderers and editors on a per type basis
rather than a per column basis - see the
setDefaultRenderer method in the JTable class.
This default mechanism is only used when the renderer (or
editor) in the TableColumn is null.
The TableColumn stores the link between the columns in the
JTable and the columns in the TableModel.
The modelIndex is the column in the
TableModel, which will be queried for the data values for the
cells in this column. As the column moves around in the view this
modelIndex does not change.
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.
TableColumnModel,
DefaultTableColumnModel,
JTableHeader.getDefaultRenderer(),
JTable.getDefaultRenderer(Class),
JTable.getDefaultEditor(Class),
JTable.getCellRenderer(int, int),
JTable.getCellEditor(int, int), Serialized Form
| Field Summary | |
static String |
CELL_RENDERER_PROPERTY
copy-> CELL_RENDERER_PROPERTY
|
protected TableCellEditor |
cellEditor
copy-> cellEditor
|
protected TableCellRenderer |
cellRenderer
copy-> cellRenderer
|
static String |
COLUMN_WIDTH_PROPERTY
copy-> COLUMN_WIDTH_PROPERTY
|
static String |
HEADER_RENDERER_PROPERTY
copy-> HEADER_RENDERER_PROPERTY
|
static String |
HEADER_VALUE_PROPERTY
copy-> HEADER_VALUE_PROPERTY
|
protected TableCellRenderer |
headerRenderer
copy-> headerRenderer
|
protected Object |
headerValue
copy-> headerValue
|
protected Object |
identifier
copy-> identifier
|
protected boolean |
isResizable
copy-> isResizable
|
protected int |
maxWidth
copy-> maxWidth
|
protected int |
minWidth
copy-> minWidth
|
protected int |
modelIndex
copy-> modelIndex
|
protected int |
resizedPostingDisableCount
copy-> resizedPostingDisableCount
|
protected int |
width
copy-> width
|
| Constructor Summary | |
TableColumn
copy-> new TableColumn()copy-> <TableColumn var> = new TableColumn();
|
|
TableColumn
copy-> new TableColumn( )copy-> <TableColumn var> = new TableColumn(<int modelIndex>);
|
|
TableColumn
copy-> new TableColumn(, )copy-> <TableColumn var> = new TableColumn(<int modelIndex>, <int width>);
|
|
TableColumn
copy-> new TableColumn(, , , )copy-> <TableColumn var> = new TableColumn(<int modelIndex>, <int width>, <TableCellRenderer cellRenderer>, <TableCellEditor cellEditor>);
|
|
| Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener listener)
copy-> .addPropertyChangeListener( )copy-> <TableColumn>.addPropertyChangeListener(<PropertyChangeListener listener>);
|
protected TableCellRenderer |
createDefaultHeaderRenderer()
copy-> .createDefaultHeaderRenderer()copy-> <TableCellRenderer var>=<TableColumn>.createDefaultHeaderRenderer();
|
void |
disableResizedPosting()
copy-> .disableResizedPosting()copy-> <TableColumn>.disableResizedPosting();
|
void |
enableResizedPosting()
copy-> .enableResizedPosting()copy-> <TableColumn>.enableResizedPosting();
|
TableCellEditor |
getCellEditor()
copy-> .getCellEditor()copy-> <TableCellEditor var>=<TableColumn>.getCellEditor();
|
TableCellRenderer |
getCellRenderer()
copy-> .getCellRenderer()copy-> <TableCellRenderer var>=<TableColumn>.getCellRenderer();
|
TableCellRenderer |
getHeaderRenderer()
copy-> .getHeaderRenderer()copy-> <TableCellRenderer var>=<TableColumn>.getHeaderRenderer();
|
Object |
getHeaderValue()
copy-> .getHeaderValue()copy-> <Object var>=<TableColumn>.getHeaderValue();
|
Object |
getIdentifier()
copy-> .getIdentifier()copy-> <Object var>=<TableColumn>.getIdentifier();
|
int |
getMaxWidth()
copy-> .getMaxWidth()copy-> <int var>=<TableColumn>.getMaxWidth();
|
int |
getMinWidth()
copy-> .getMinWidth()copy-> <int var>=<TableColumn>.getMinWidth();
|
int |
getModelIndex()
copy-> .getModelIndex()copy-> <int var>=<TableColumn>.getModelIndex();
|
int |
getPreferredWidth()
copy-> .getPreferredWidth()copy-> <int var>=<TableColumn>.getPreferredWidth();
|
boolean |
getResizable()
copy-> .getResizable()copy-> <boolean var>=<TableColumn>.getResizable();
|
int |
getWidth()
copy-> .getWidth()copy-> <int var>=<TableColumn>.getWidth();
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
copy-> .removePropertyChangeListener( )copy-> <TableColumn>.removePropertyChangeListener(<PropertyChangeListener listener>);
|
void |
setCellEditor(TableCellEditor cellEditor)
copy-> .setCellEditor( )copy-> <TableColumn>.setCellEditor(<TableCellEditor cellEditor>);
|
void |
setCellRenderer(TableCellRenderer cellRenderer)
copy-> .setCellRenderer( )copy-> <TableColumn>.setCellRenderer(<TableCellRenderer cellRenderer>);
|
void |
setHeaderRenderer(TableCellRenderer headerRenderer)
copy-> .setHeaderRenderer( )copy-> <TableColumn>.setHeaderRenderer(<TableCellRenderer headerRenderer>);
|
void |
setHeaderValue(Object headerValue)
copy-> .setHeaderValue( )copy-> <TableColumn>.setHeaderValue(<Object headerValue>);
|
void |
setIdentifier(Object identifier)
copy-> .setIdentifier( )copy-> <TableColumn>.setIdentifier(<Object identifier>);
|
void |
setMaxWidth(int maxWidth)
copy-> .setMaxWidth( )copy-> <TableColumn>.setMaxWidth(<int maxWidth>);
|
void |
setMinWidth(int minWidth)
copy-> .setMinWidth( )copy-> <TableColumn>.setMinWidth(<int minWidth>);
|
void |
setModelIndex(int modelIndex)
copy-> .setModelIndex( )copy-> <TableColumn>.setModelIndex(<int modelIndex>);
|
void |
setPreferredWidth(int preferredWidth)
copy-> .setPreferredWidth( )copy-> <TableColumn>.setPreferredWidth(<int preferredWidth>);
|
void |
setResizable(boolean isResizable)
copy-> .setResizable( )copy-> <TableColumn>.setResizable(<boolean isResizable>);
|
void |
setWidth(int width)
copy-> .setWidth( )copy-> <TableColumn>.setWidth(<int width>);
|
void |
sizeWidthToFit()
copy-> .sizeWidthToFit()copy-> <TableColumn>.sizeWidthToFit();
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |