void | addColumn(TableColumn column)- Add the new table column.
|
void | addColumnSelectionInterval(int index0, int index1)
|
void | addNotify()- Called when this container is added to another container to inform it
to create its peer.
|
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)- 1.0.2, replaced by
new JScrollPane(JTable)
|
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
setValueAt(Object,int,int).
|
AccessibleContext | getAccessibleContext()- Get the value of the
JComponent.accessibleContext property.
|
boolean | getAutoCreateColumnsFromModel()- Get the value of the
autoCreateColumnsFromModel property.
|
int | getAutoResizeMode()- Get the value of the
autoResizeMode property.
|
TableCellEditor | getCellEditor()- Get the value of the
cellEditor property.
|
TableCellEditor | getCellEditor(int row, int column)- Get the cell editor, suitable for editing the given cell.
|
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.getMinSelectionIndex() 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()- Called when this container is removed from its parent container to
inform it to destroy its peer.
|
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.
Unregister this as a CellEditorListener from
previous cellEditor and register it with new parameter
c.
|
void | setCellSelectionEnabled(boolean c)- Set the value of the
cellSelectionEnabled property.
|
void | setColumnModel(TableColumnModel c)- Set the value of the
columnModel property.
Unregister this as a TableColumnModelListener
from previous columnModel and register it with new parameter
c.
|
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.
Unregister this as a TableModelListener from
previous dataModel and register it with new parameter
m.
|
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.
Fire a PropertyChangeEvent with name SELECTION_BACKGROUND_CHANGED_PROPERTY to registered listeners, if
selectionBackground changed.
|
void | setSelectionForeground(Color s)- Set the value of the
selectionForeground property.
Fire a PropertyChangeEvent with name SELECTION_FOREGROUND_CHANGED_PROPERTY to registered listeners, if
selectionForeground changed.
|
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.
Unregister this as a ListSelectionListener
from previous selectionModel and register it with new
parameter s.
|
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)- Replaced by
doLayout()
|
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.
|