javax.swing
public class JTable extends JComponent implements TableModelListener, Scrollable, TableColumnModelListener, ListSelectionListener, CellEditorListener, Accessible
Nested Class Summary | |
---|---|
protected class | JTable.AccessibleJTable
Provides accessibility support for JTable .
|
Field Summary | |
---|---|
static int | AUTO_RESIZE_ALL_COLUMNS
When resizing column i in a table of n
columns, automatically change all columns in the range [0,
n) (with the exception of column i) uniformly, to provide or
absorb excess space requirements. |
static int | AUTO_RESIZE_LAST_COLUMN
When resizing column i in a table of n
columns, automatically change column n-1 (the last column
in the table) to provide or absorb excess space requirements. |
static int | AUTO_RESIZE_NEXT_COLUMN
When resizing column i , automatically change only the
single column i+1 to provide or absorb excess space
requirements. |
static int | AUTO_RESIZE_OFF
When resizing columns, do not automatically change any columns. |
static int | AUTO_RESIZE_SUBSEQUENT_COLUMNS
When resizing column i in a table of n
columns, automatically change all columns in the range [i+1,
n) , uniformly, to provide or absorb excess space requirements. |
protected boolean | autoCreateColumnsFromModel
Whether or not the table should automatically compute a matching
TableColumnModel and assign it to the columnModel
property when the dataModel property is changed.
|
protected int | autoResizeMode
A numeric code specifying the resizing behavior of the table. |
protected TableCellEditor | cellEditor
The current cell editor. |
protected boolean | cellSelectionEnabled
Obsolete. |
protected TableColumnModel | columnModel A model of various aspects of the columns of the table, not including the data stored in them. |
protected TableModel | dataModel
The model for data stored in the table. |
protected Hashtable | defaultEditorsByColumnClass
A table mapping java.lang.Class objects to
TableCellEditor objects. |
protected Hashtable | defaultRenderersByColumnClass
A table mapping java.lang.Class objects to
TableCellEditor objects. |
protected int | editingColumn
The column that is edited, -1 if the table is not edited currently. |
protected int | editingRow
The row that is edited, -1 if the table is not edited currently. |
protected Component | editorComp
The component that is used for editing.
|
protected Color | gridColor
The color to paint the grid lines of the table, when either showHorizontalLines or showVerticalLines is set.
|
protected Dimension | preferredViewportSize
The size this table would prefer its viewport assume, if it is
contained in a JScrollPane.
|
protected int | rowHeight
The height in pixels of any row of the table. |
protected int | rowMargin
The height in pixels of the gap left between any two rows of the table.
|
protected boolean | rowSelectionAllowed
Whether or not the table should allow row selection. |
protected Color | selectionBackground
The color to paint the background of selected cells. |
protected Color | selectionForeground
The color to paint the foreground of selected cells. |
protected ListSelectionModel | selectionModel
A model of the rows of this table which are currently selected. |
protected boolean | showHorizontalLines
The showHorizontalLines property. |
protected boolean | showVerticalLines
The showVerticalLines property. |
protected JTableHeader | tableHeader
The tableHeader property. |
Constructor Summary | |
---|---|
JTable()
Creates a new JTable instance. | |
JTable(int numRows, int numColumns)
Creates a new JTable instance with the given number
of rows and columns.
| |
JTable(Object[][] data, Object[] columnNames)
Creates a new JTable instance, storing the given data
array and heaving the given column names. | |
JTable(TableModel model)
Creates a new JTable instance, using the given data model
object that provides information about the table content. | |
JTable(TableModel dm, TableColumnModel cm)
Creates a new JTable instance, using the given model object
that provides information about the table content. | |
JTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm)
Creates a new JTable instance, providing data model,
column model and list selection model. | |
JTable(Vector data, Vector columnNames)
Creates a new JTable instance that uses data and column
names, stored in Vectors.
|
Method Summary | |
---|---|
void | addColumn(TableColumn column)
Add the new table column. |
void | addColumnSelectionInterval(int index0, int index1) |
void | addNotify() |
void | addRowSelectionInterval(int index0, int index1) |
void | changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend) |
void | clearSelection() |
void | columnAdded(TableColumnModelEvent event)
Invoked when the column is added. |
int | columnAtPoint(Point point)
Returns index of the column that contains specified point
or -1 if this table doesn't contain this point.
|
void | columnMarginChanged(ChangeEvent event)
Invoked when the column margin is changed.
|
void | columnMoved(TableColumnModelEvent event)
Invoked when the column is moved. |
void | columnRemoved(TableColumnModelEvent event)
Invoked when the column is removed. |
void | columnSelectionChanged(ListSelectionEvent event)
Invoked when the the column selection changes, repaints the changed
columns. |
protected void | configureEnclosingScrollPane() |
int | convertColumnIndexToModel(int vc)
Convert the table model index into the table column number.
|
int | convertColumnIndexToView(int mc)
Convert the table column number to the table column model index.
|
protected TableColumnModel | createDefaultColumnModel()
Create the default table column model that is used if the user-defined
column model is not provided. |
void | createDefaultColumnsFromModel()
Clears any existing columns from the JTable 's
TableColumnModel and creates new columns to match the values in
the data (TableModel) used by the table.
|
protected TableModel | createDefaultDataModel()
Create the default table data model that is used if the user-defined
data model is not provided. |
protected void | createDefaultEditors()
Create the default editors for this table. |
protected void | createDefaultRenderers()
Create the default renderers for this table. |
protected ListSelectionModel | createDefaultSelectionModel()
Create the default table selection model that is used if the user-defined
selection model is not provided. |
protected JTableHeader | createDefaultTableHeader()
Create the default table header, if the user - defined table header is not
provided.
|
static JScrollPane | createScrollPaneForTable(JTable table) |
void | doLayout()
Set the widths of all columns, taking they preferred widths into
consideration. |
boolean | editCellAt(int row, int column)
Programmatically starts editing the specified cell.
|
boolean | editCellAt(int row, int column, EventObject e)
Programmatically starts editing the specified cell.
|
void | editingCanceled(ChangeEvent event)
Invoked when the editing is cancelled. |
void | editingStopped(ChangeEvent event)
Finish the current editing session and update the table with the
new value by calling JTable.
|
AccessibleContext | getAccessibleContext()
Get the value of the JTable property.
|
boolean | getAutoCreateColumnsFromModel()
Get the value of the autoCreateColumnsFromModel property.
|
int | getAutoResizeMode()
Get the value of the autoResizeMode property.
|
TableCellEditor | getCellEditor(int row, int column)
Get the cell editor, suitable for editing the given cell. |
TableCellEditor | getCellEditor()
Get the value of the cellEditor property.
|
Rectangle | getCellRect(int row, int column, boolean includeSpacing)
Calculate the visible rectangle for a particular row and column. |
TableCellRenderer | getCellRenderer(int row, int column)
Get the cell renderer for rendering the given cell.
|
boolean | getCellSelectionEnabled()
Get the value of the cellSelectionEnabled property.
|
TableColumn | getColumn(Object identifier)
Get table column with the given identified.
|
Class<?> | getColumnClass(int column)
Get the class (datatype) of the column. |
int | getColumnCount()
Get the value of the columnCount property by
delegation to the columnModel field.
|
TableColumnModel | getColumnModel()
Get the value of the columnModel property.
|
String | getColumnName(int column)
Get the name of the column. |
boolean | getColumnSelectionAllowed()
Get the value of the columnSelectionAllowed property.
|
TableCellEditor | getDefaultEditor(Class<?> columnClass)
Get the default editor for editing values of the given type
(String, Boolean and so on).
|
TableCellRenderer | getDefaultRenderer(Class<?> columnClass)
Get the default renderer for rendering the given data type.
|
boolean | getDragEnabled()
Get the value of the dragEnabled property.
|
int | getEditingColumn()
Get the column, currently being edited
|
int | getEditingRow()
Get the row currently being edited.
|
Component | getEditorComponent()
Get the editor component that is currently editing one of the cells
|
Color | getGridColor()
Get the value of the gridColor property.
|
Dimension | getIntercellSpacing()
Get the value of the intercellSpacing property.
|
TableModel | getModel()
Get the value of the dataModel property.
|
Dimension | getPreferredScrollableViewportSize()
Get the value of the preferredViewportSize property.
|
int | getRowCount()
Get the value of the rowCount property by
delegation to the dataModel field.
|
int | getRowHeight()
Get the value of the rowHeight property.
|
int | getRowHeight(int row)
Get the height of the specified row.
|
int | getRowMargin()
Get the value of the rowMargin property.
|
boolean | getRowSelectionAllowed()
Get the value of the rowSelectionAllowed property.
|
int | getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) |
boolean | getScrollableTracksViewportHeight()
Get the value of the scrollableTracksViewportHeight property.
|
boolean | getScrollableTracksViewportWidth()
Get the value of the scrollableTracksViewportWidth property.
|
int | getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
Return the preferred scrolling amount (in pixels) for the given scrolling
direction and orientation. |
int | getSelectedColumn()
Get the value of the selectedColumn property by
delegation to the columnModel field.
|
int | getSelectedColumnCount()
Get the value of the selectedColumnCount property by
delegation to the columnModel field.
|
int[] | getSelectedColumns()
Get the value of the selectedColumns property by
delegation to the columnModel field.
|
int | getSelectedRow()
Get the value of the selectedRow property by delegation to
the ListSelectionModel method of the
selectionModel field.
|
int | getSelectedRowCount()
Get the value of the selectedRowCount property by
delegation to the selectionModel field.
|
int[] | getSelectedRows()
Get the value of the selectedRows property by
delegation to the selectionModel field.
|
Color | getSelectionBackground()
Get the value of the selectionBackground property.
|
Color | getSelectionForeground()
Get the value of the selectionForeground property.
|
ListSelectionModel | getSelectionModel()
Get the value of the selectionModel property.
|
boolean | getShowHorizontalLines()
Get the value of the showHorizontalLines property.
|
boolean | getShowVerticalLines()
Get the value of the showVerticalLines property.
|
boolean | getSurrendersFocusOnKeystroke()
Returns whether cell editors of this table should receive keyboard focus
when the editor is activated by a keystroke. |
JTableHeader | getTableHeader()
Get the value of the tableHeader property.
|
TableUI | getUI()
This method returns the table's UI delegate.
|
String | getUIClassID() |
Object | getValueAt(int row, int column)
Get the cell value at the given position.
|
protected void | initializeLocalVars()
Initialize local variables to default values. |
boolean | isCellEditable(int row, int column)
Returns true if the specified cell is editable, and
false otherwise.
|
boolean | isCellSelected(int row, int column)
Checks if the given cell is selected. |
boolean | isColumnSelected(int column)
Checks if the given column is selected.
|
boolean | isEditing()
Check if one of the table cells is currently being edited.
|
boolean | isRowSelected(int row)
Checks if the given row is selected.
|
void | moveColumn(int column, int targetColumn)
Moves column at the specified index to new given location.
|
Component | prepareEditor(TableCellEditor editor, int row, int column)
Prepares the editor by querying for the value and selection state of the
cell at (row, column).
|
Component | prepareRenderer(TableCellRenderer renderer, int row, int column)
Prepare the renderer for rendering the given cell.
|
void | removeColumn(TableColumn column)
Removes specified column from displayable columns of this table.
|
void | removeColumnSelectionInterval(int index0, int index1) |
void | removeEditor()
Discards the editor object. |
void | removeNotify() |
void | removeRowSelectionInterval(int index0, int index1) |
protected void | resizeAndRepaint()
This revalidates the JTable and queues a repaint. |
int | rowAtPoint(Point point)
Returns index of the row that contains specified point or -1 if this table
doesn't contain this point.
|
void | selectAll()
Select all table. |
void | setAutoCreateColumnsFromModel(boolean autoCreate)
Set the value of the autoCreateColumnsFromModel flag. |
void | setAutoResizeMode(int a)
Set the value of the autoResizeMode property.
|
void | setCellEditor(TableCellEditor c) Set the value of the cellEditor property. |
void | setCellSelectionEnabled(boolean c)
Set the value of the cellSelectionEnabled property.
|
void | setColumnModel(TableColumnModel c) Set the value of the columnModel property. |
void | setColumnSelectionAllowed(boolean c)
Set the value of the columnSelectionAllowed property.
|
void | setColumnSelectionInterval(int index0, int index1) |
void | setDefaultEditor(Class<?> columnClass, TableCellEditor editor)
Set the default editor for the given column class (column data type).
|
void | setDefaultRenderer(Class<?> columnClass, TableCellRenderer rend)
Set default renderer for rendering the given data type.
|
void | setDragEnabled(boolean d)
Set the value of the dragEnabled property.
|
void | setEditingColumn(int column)
Set the column, currently being edited
|
void | setEditingRow(int row)
Set the row currently being edited.
|
void | setGridColor(Color g)
Set the value of the gridColor property.
|
void | setIntercellSpacing(Dimension i)
Set the value of the intercellSpacing property.
|
void | setModel(TableModel m) Set the value of the dataModel property. |
void | setPreferredScrollableViewportSize(Dimension p)
Set the value of the preferredViewportSize property.
|
void | setRowHeight(int r)
Sets the height for all rows in the table. |
void | setRowHeight(int row, int rh)
Sets the height of a single row in the table.
|
void | setRowMargin(int r)
Set the value of the rowMargin property.
|
void | setRowSelectionAllowed(boolean r)
Set the value of the rowSelectionAllowed property.
|
void | setRowSelectionInterval(int index0, int index1) |
void | setSelectionBackground(Color s) Set the value of the selectionBackground property. |
void | setSelectionForeground(Color s) Set the value of the selectionForeground property. |
void | setSelectionMode(int s)
Set the value of the selectionMode property by
delegation to the selectionModel field. |
void | setSelectionModel(ListSelectionModel s) Set the value of the selectionModel property. |
void | setShowGrid(boolean s)
Set the value of the showGrid property.
|
void | setShowHorizontalLines(boolean s)
Set the value of the showHorizontalLines property.
|
void | setShowVerticalLines(boolean s)
Set the value of the showVerticalLines property.
|
void | setSurrendersFocusOnKeystroke(boolean value)
Sets whether cell editors of this table should receive keyboard focus
when the editor is activated by a keystroke. |
void | setTableHeader(JTableHeader t)
Set the value of the tableHeader property.
|
void | setUI(TableUI ui)
This method sets the table's UI delegate.
|
void | setValueAt(Object value, int row, int column)
Set value for the cell at the given position. |
void | sizeColumnsToFit(boolean lastColumnOnly) |
void | sizeColumnsToFit(int resizingColumn)
Obsolete since JDK 1.4. |
void | tableChanged(TableModelEvent event)
Invoked when the table changes.
|
protected void | unconfigureEnclosingScrollPane() |
void | updateUI() |
void | valueChanged(ListSelectionEvent event)
Invoked when another table row is selected. |
i
in a table of n
columns, automatically change all columns in the range [0,
n)
(with the exception of column i) uniformly, to provide or
absorb excess space requirements.i
in a table of n
columns, automatically change column n-1
(the last column
in the table) to provide or absorb excess space requirements.i
, automatically change only the
single column i+1
to provide or absorb excess space
requirements.i
in a table of n
columns, automatically change all columns in the range [i+1,
n)
, uniformly, to provide or absorb excess space requirements.See Also: setModel createDefaultColumnsFromModel setColumnModel JTable getAutoCreateColumnsFromModel
See Also: doLayout JTable getAutoResizeMode
A model of various aspects of the columns of the table, not including the data stored in them. The TableColumnModel is principally concerned with holding a set of TableColumn objects, each of which describes the display parameters of a column and the numeric index of the column from the data model which the column is presenting.
The TableColumnModel also contains a ListSelectionModel which indicates which columns are currently selected. This selection model works in combination with the selectionModel of the table itself to specify a table selection: a combination of row and column selections.
Most application programmers do not need to work with this property at all: setting autoCreateColumnsFromModel will construct the columnModel automatically, and the table acts as a facade for most of the interesting properties of the columnModel anyways.
See Also: setColumnModel getColumnModel
dataModel
, despite its
property name. The table listens to its model as a TableModelListener.
See Also: tableChanged TableModel#addTableModelListener(TableModelListener)
null
if the table is not editing currently.
See Also: setGridColor getGridColor
See Also: setPreferredScrollableViewportSize getPreferredScrollableViewportSize
See Also: getRowHeight JTable TableColumn#getWidth() TableColumn#setWidth(int)
See Also: JTable getRowHeight getIntercellSpacing setIntercellSpacing TableColumnModel#getColumnMargin() TableColumnModel#setColumnMargin(int)
See Also: TableColumnModel#getColumnSelectionAllowed() JTable getRowSelectionAllowed getCellSelectionEnabled JTable
See Also: setSelectionBackground getSelectionBackground
See Also: setSelectionForeground getSelectionForeground
See Also: rowSelectionAllowed setSelectionModel getSelectionModel TableColumnModel#getSelectionModel() addListSelectionListener
JTable
instance.JTable
instance with the given number
of rows and columns.
Parameters: numRows an int
value numColumns an int
value
JTable
instance, storing the given data
array and heaving the given column names. To see the column names,
you must place the JTable into the JScrollPane.
Parameters: data an Object[][]
the table data columnNames an Object[]
the column headers
JTable
instance, using the given data model
object that provides information about the table content. The table model
object is asked for the table size, other features and also receives
notifications in the case when the table has been edited by the user.
Parameters: model the table model.
JTable
instance, using the given model object
that provides information about the table content. The table data model
object is asked for the table size, other features and also receives
notifications in the case when the table has been edited by the user. The
table column model provides more detailed control on the table column
related features.
Parameters: dm the table data mode cm the table column model
JTable
instance, providing data model,
column model and list selection model. The list selection model
manages the selections.
Parameters: dm data model (manages table data) cm column model (manages table columns) sm list selection model (manages table selections)
JTable
instance that uses data and column
names, stored in Vectors.
Parameters: data the table data columnNames the table column names.
Parameters: column the new column to add.
Parameters: point point to identify the column
Returns: index of the column that contains specified point or -1 if this table doesn't contain this point.
Parameters: vc the column number (0=first).
Returns: the table column model index of this column.
See Also: TableColumn#getModelIndex()
Parameters: mc the table column index (0=first).
Returns: the table column number in the model
See Also: TableColumn#getModelIndex()
Returns: the created table column model.
JTable
's
TableColumnModel and creates new columns to match the values in
the data (TableModel) used by the table.
See Also: JTable
Returns: the created table data model.
Returns: the created table data model.
Returns: the default table header.
Deprecated: 1.0.2, replaced by new JScrollPane(JTable)
See Also: TableColumn#setPreferredWidth(int)
Parameters: row the row of the cell to edit. column the column of the cell to edit.
Parameters: row the row of the cell to edit. column the column of the cell to edit.
Parameters: event the change event
Returns: The current value of the property
Returns: The current value of the property
Returns: The current value of the property
Parameters: row the cell row column the cell column
Returns: the editor to edit that cell
Returns: The current value of the property
Parameters: row the visible row to get the cell rectangle of
column the visible column to get the cell rectangle of, which may
differ from the dataModel column
includeSpacing whether or not to include the cell margins in the
resulting cell. If false
, the result will only contain the
inner area of the target cell, not including its margins.
Returns: a rectangle enclosing the specified cell
Parameters: row the cell row column the cell column
Returns: the cell renderer to render that cell.
Returns: The current value of the property
Parameters: identifier the column identifier
Returns: the table column with this identifier
Throws: IllegalArgumentException if identifier
is
null
or there is no column with that identifier.
See Also: TableColumn#setIdentifier(Object)
Parameters: column the column (not the model index).
Returns: the class, defining data type of that column (String.class for String, Boolean.class for boolean and so on).
columnCount
property by
delegation to the columnModel field.
Returns: The current value of the columnCount property
Returns: The current value of the property
Parameters: column the column
Returns: the name of that column.
columnSelectionAllowed
property.
Returns: The current value of the columnSelectionAllowed property
See Also: JTable
Parameters: columnClass the class of the value that will be edited.
Returns: the editor, suitable for editing this data type
Parameters: columnClass the data that must be rendered
Returns: the appropriate defauld renderer for rendering that data type.
Returns: The current value of the property
Returns: the column, currently being edited.
Returns: the row, currently being edited.
Returns: the editor component or null, if none of the cells is being edited.
Returns: The current value of the property
intercellSpacing
property.
Returns: The current value of the property
Returns: The current value of the property
Returns: The current value of the property
rowCount
property by
delegation to the dataModel field.
Returns: The current value of the rowCount property
Returns: The current value of the property
Parameters: row the row whose height to return
Returns: The current value of the property
Returns: The current value of the property
See Also: JTable
scrollableTracksViewportHeight
property.
Returns: The constant value false
scrollableTracksViewportWidth
property.
Returns: true
unless the autoResizeMode property is
AUTO_RESIZE_OFF
Parameters: visibleRect the currently visible part of the component. orientation the scrolling orientation direction the scrolling direction (negative - up, positive -down). The values greater than one means that more mouse wheel or similar events were generated, and hence it is better to scroll the longer distance.
selectedColumn
property by
delegation to the columnModel field.
Returns: The current value of the selectedColumn property
selectedColumnCount
property by
delegation to the columnModel field.
Returns: The current value of the selectedColumnCount property
selectedColumns
property by
delegation to the columnModel field.
Returns: The current value of the selectedColumns property
Returns: The current value of the selectedRow property
selectedRowCount
property by
delegation to the selectionModel field.
Returns: The current value of the selectedRowCount property
selectedRows
property by
delegation to the selectionModel field.
Returns: The current value of the selectedRows property
Returns: The current value of the property
Returns: The current value of the property
Returns: The current value of the property
Returns: The current value of the property
Returns: The current value of the property
false
which means that the table should keep the keyboard
focus until the cell is selected by a mouse click.
Returns: whether cell editors of this table should receive keyboard focus when the editor is activated by a keystroke
Since: 1.4
Returns: The current value of the property
Returns: The table's UI delegate.
Parameters: row the row to get the value column the actual column number (not the model index) to get the value.
Returns: the cell value, as returned by model.
true
if the specified cell is editable, and
false
otherwise.
Parameters: row the row index. column the column index.
Returns: true if the cell is editable, false otherwise.
Parameters: row the cell row column the cell column
Returns: true if the cell is selected, false otherwise
Parameters: column the column
Returns: true if the column is selected (as reported by the selection model, associated with the column model), false otherwise.
Returns: true if there is a cell being edited.
Parameters: row the row
Returns: true if the row is selected (as reported by the selection model), false otherwise.
Parameters: column index of the column to move targetColumn index specifying new location of the column
Parameters: editor the TableCellEditor to set up row the row of the cell to edit column the column of the cell to edit
Returns: the Component being edited
Parameters: renderer the renderer being prepared row the row of the cell being rendered column the column of the cell being rendered
Returns: the component which .paint() method will paint the cell.
Parameters: column column to removed
JTable
and queues a repaint.Parameters: point point to identify the row
Returns: index of the row that contains specified point or -1 if this table doesn't contain this point.
false
to true
, the
createDefaultColumnsFromModel method is called.
Parameters: autoCreate the new value of the flag.
Parameters: a The new value of the autoResizeMode property
Set the value of the cellEditor property.
Unregister this
as a CellEditorListener from
previous cellEditor and register it with new parameter
c
.
Parameters: c The new value of the cellEditor property
Parameters: c The new value of the cellSelectionEnabled property
Set the value of the columnModel property.
Unregister this
as a TableColumnModelListener
from previous columnModel and register it with new parameter
c
.
Parameters: c The new value of the columnModel property
columnSelectionAllowed
property.
Parameters: c The new value of the property
See Also: getColumnSelectionAllowed
Parameters: columnClass the column data type editor the editor that will edit this data type
See Also: TableModel#getColumnClass(int)
Parameters: columnClass the data type (String, Boolean and so on) that must be rendered. rend the renderer that will rend this data type
Parameters: d The new value of the dragEnabled property
Parameters: column the column, currently being edited.
Parameters: row the row, that will be edited
Parameters: g The new value of the gridColor property
intercellSpacing
property.
Parameters: i The new value of the intercellSpacing property
Set the value of the dataModel property.
Unregister this
as a TableModelListener from
previous dataModel and register it with new parameter
m
.
Parameters: m The new value of the model property
Parameters: p The new value of the preferredViewportSize property
Parameters: r the height to set for all rows
See Also: getRowHeight JTable JTable
Parameters: rh the new row height row the row to change the height of
Parameters: r The new value of the rowMargin property
Parameters: r The new value of the rowSelectionAllowed property
See Also: getRowSelectionAllowed
Set the value of the selectionBackground property.
Fire a PropertyChangeEvent with name SELECTION_BACKGROUND_CHANGED_PROPERTY to registered listeners, if selectionBackground changed.
Parameters: s The new value of the selectionBackground property
Set the value of the selectionForeground property.
Fire a PropertyChangeEvent with name SELECTION_FOREGROUND_CHANGED_PROPERTY to registered listeners, if selectionForeground changed.
Parameters: s The new value of the selectionForeground property
selectionMode
property by
delegation to the selectionModel field. The same selection
mode is set for row and column selection models.
Parameters: s The new value of the property
Set the value of the selectionModel property.
Unregister this
as a ListSelectionListener
from previous selectionModel and register it with new
parameter s
.
Parameters: s The new value of the selectionModel property
showGrid
property.
Parameters: s The new value of the showGrid property
Parameters: s The new value of the showHorizontalLines property
Parameters: s The new value of the showVerticalLines property
false
which means that the table should keep the keyboard
focus until the cell is selected by a mouse click.
Parameters: value the value to set
Since: 1.4
Parameters: t The new value of the tableHeader property
Parameters: ui The table's UI delegate.
Parameters: value the value to set row the row of the cell being modified column the column of the cell being modified
Deprecated: Replaced by doLayout()
doLayout()
.null
means everything changed.