Java javax.swing.table TableColumn fields, constructors, methods, implement or subclass

Example usage for Java javax.swing.table TableColumn fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing.table TableColumn.

The text is from its open source code.

Constructor

TableColumn(int modelIndex)
Cover method, using a default width of 75, a null renderer and a null editor.
TableColumn(int modelIndex, int width, TableCellRenderer cellRenderer, TableCellEditor cellEditor)
Creates and initializes an instance of TableColumn with the specified model index, width, cell renderer, and cell editor; all TableColumn constructors delegate to this one.
TableColumn()
Cover method, using a default model index of 0, default width of 75, a null renderer and a null editor.
TableColumn(int modelIndex, int width)
Cover method, using a null renderer and a null editor.

Method

voidaddPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.
TableCellEditorgetCellEditor()
Returns the TableCellEditor used by the JTable to edit values for this column.
TableCellRenderergetCellRenderer()
Returns the TableCellRenderer used by the JTable to draw values for this column.
TableCellRenderergetHeaderRenderer()
Returns the TableCellRenderer used to draw the header of the TableColumn.
ObjectgetHeaderValue()
Returns the Object used as the value for the header renderer.
ObjectgetIdentifier()
Returns the identifier object for this column.
intgetModelIndex()
Returns the model index for this column.
intgetPreferredWidth()
Returns the preferred width of the TableColumn.
intgetWidth()
Returns the width of the TableColumn.
voidsetCellEditor(TableCellEditor cellEditor)
Sets the editor to used by when a cell in this column is edited.
voidsetCellRenderer(TableCellRenderer cellRenderer)
Sets the TableCellRenderer used by JTable to draw individual values for this column.
voidsetHeaderRenderer(TableCellRenderer headerRenderer)
Sets the TableCellRenderer used to draw the TableColumn's header to headerRenderer.
voidsetHeaderValue(Object headerValue)
Sets the Object whose string representation will be used as the value for the headerRenderer.
voidsetIdentifier(Object identifier)
Sets the TableColumn's identifier to anIdentifier.
voidsetMaxWidth(int maxWidth)
Sets the TableColumn's maximum width to maxWidth or, if maxWidth is less than the minimum width, to the minimum width.
voidsetMinWidth(int minWidth)
Sets the TableColumn's minimum width to minWidth, adjusting the new minimum width if necessary to ensure that 0 <= minWidth <= maxWidth.
voidsetModelIndex(int modelIndex)
Sets the model index for this column.
voidsetPreferredWidth(int preferredWidth)
Sets this column's preferred width to preferredWidth.
voidsetResizable(boolean isResizable)
Sets whether this column can be resized.
voidsetWidth(int width)
This method should not be used to set the widths of columns in the JTable, use setPreferredWidth instead.
voidsizeWidthToFit()
Resizes the TableColumn to fit the width of its header cell.