JTable.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. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans package.
Please see java..
javax.swing.JTable
| Modifier and Type | Class and Description |
|---|---|
| protected class | JTableHeader.
This class implements accessibility support for the
|
| Modifier and Type | Field and Description |
|---|---|
| protected TableColumnModel | columnModel
The |
| private TableCellRenderer | defaultRenderer
The default renderer to be used when a |
| protected transient TableColumn | draggedColumn
The index of the column being dragged. |
| protected transient int | draggedDistance
The distance from its original position the column has been dragged. |
| protected boolean | reorderingAllowed
If true, reordering of columns are allowed by the user; the default is true. |
| protected boolean | resizingAllowed
If true, resizing of columns are allowed by the user; the default is true. |
| protected transient TableColumn | resizingColumn
The index of the column being resized. |
| protected JTable | table
The table for which this object is the header;
the default is |
| private static final String | |
| private transient boolean | updateInProgress
Flag to indicate UI update is in progress |
| protected boolean | updateTableInRealTime
Obsolete as of Java 2 platform v1.3. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JTableHeader(TableColumnModel
the column model for the table cm)Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public void | columnAdded(TableColumnModelEvent
the event received e)Implements javax. Invoked when a column is added to the table column model. |
| public int | Returns: the index of the column thatpoint lies in, or -1 if it
lies out of boundsif this point)point lies within a column, the index of
that column will be returned; otherwise it is out of bounds
and -1 is returnedReturns the index of the column that |
| public void | columnMarginChanged(ChangeEvent
the event received e)Implements javax. Invoked when a column is moved due to a margin change. |
| public void | columnMoved(TableColumnModelEvent
the event received e)Implements javax. Invoked when a column is repositioned. |
| public void | columnRemoved(TableColumnModelEvent
the event received e)Implements javax. Invoked when a column is removed from the table column model. |
| public void | columnSelectionChanged(ListSelectionEvent
the event received e)Implements javax. Invoked when the selection model of the |
| protected TableColumnModel | Returns: the default column model objectReturns the default column model object which is
a |
| protected TableCellRenderer | Returns: the default table column rendererReturns a default renderer to be used when no header renderer
is defined by a |
| public AccessibleContext | Returns: an AccessibleJTableHeader that serves as the AccessibleContext of this JTableHeaderOverrides java. Implements javax. Gets the AccessibleContext associated with this JTableHeader. |
| public TableColumnModel | Returns: thecolumnModel propertyReturns the |
| public TableCellRenderer | Returns: the default rendererReturns the default renderer used when no |
| public TableColumn | Returns: the dragged column, if a drag is in process, otherwise returnsnullReturns the dragged column, if and only if, a drag is in
process, otherwise returns |
| public int | Returns: the column's horizontal distance from its original position, if a drag is in process, otherwise the return value is meaninglessReturns the column's horizontal distance from its original position, if and only if, a drag is in process. |
| public Rectangle | Returns: the rectangle containing the header tile atcolumnindex of the column column)Returns the rectangle containing the header tile at |
| public Dimension | Returns: the sizeOverrides javax. Returns the preferred size of the table header. |
| public boolean | Returns: thereorderingAllowed propertyReturns true if the user is allowed to rearrange columns by dragging their headers, false otherwise. |
| public boolean | Returns: theresizingAllowed propertyReturns true if the user is allowed to resize columns by dragging between their headers, false otherwise. |
| public TableColumn | Returns: the resizing column, if a resize is in process, otherwise returnsnullReturns the resizing column. |
| public JTable | |
| public String | Returns: the tool tip for this componentthe location of the event identifies the proper
renderer and, therefore, the proper tip event)Overrides javax. Allows the renderer's tips to be used if there is text set. |
| public TableHeaderUI | Returns: theTableHeaderUI object that renders this componentOverrides javax. Returns the look and feel (L&F) object that renders this component. |
| public String | Returns: the string "TableHeaderUI"Overrides javax. Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component. |
| public boolean | Returns: true if the table updates in real timeObsolete as of Java 2 platform v1.3. |
| private int | |
| protected void | |
| protected String | Returns: a string representation of thisJTableHeaderOverrides javax. Returns a string representation of this |
| public void | |
| public void | setColumnModel(TableColumnModel
the new data source for this table columnModel)Sets the column model for this table to |
| public void | setDefaultRenderer(TableCellRenderer
the default renderer defaultRenderer)Sets the default renderer to be used when no |
| public void | setDraggedColumn(TableColumn
the column being dragged, or aColumn)null if
no column is being draggedSets the header's |
| public void | |
| public void | setReorderingAllowed(boolean
true if the table view should allow
reordering; otherwise false reorderingAllowed)Sets whether the user can drag column headers to reorder columns. |
| public void | setResizingAllowed(boolean
true if table view should allow
resizing resizingAllowed)Sets whether the user can resize columns by dragging between headers. |
| public void | setResizingColumn(TableColumn
the column being resized, or aColumn)null if
no column is being resizedSets the header's |
| public void | |
| public void | setUI(TableHeaderUI
the ui)TableHeaderUI L&F objectSets the look and feel (L&F) object that renders this component. |
| public void | setUpdateTableInRealTime(boolean
true if tableView should update the body of the
table in real time flag)Obsolete as of Java 2 platform v1.3. |
| public void | updateUI()
Overrides javax. Notification from the |