Top Fields Constructors Methods
sun.tools.jconsole.inspector

public abstract Class XTable

extends JTable
Class Inheritance
Known Direct Subclasses
sun.tools.jconsole.inspector.XMBeanAttributes
Annotations
@SuppressWarnings:serial
Imports
java.awt.Color, .Component, .Font, javax.swing.JTable, javax.swing.table.DefaultTableCellRenderer, .DefaultTableModel, .TableCellRenderer

Field Summary

Modifier and TypeField and Description
private Font
private Color
private Color
private Color
pack-priv static final int
private Font
pack-priv static final int
Inherited from javax.swing.JTable:
AUTO_RESIZE_ALL_COLUMNSAUTO_RESIZE_LAST_COLUMNAUTO_RESIZE_NEXT_COLUMNAUTO_RESIZE_OFFAUTO_RESIZE_SUBSEQUENT_COLUMNSautoCreateColumnsFromModelautoResizeModecellEditorcellSelectionEnabledcolumnModeldataModeldefaultEditorsByColumnClassdefaultRenderersByColumnClasseditingColumneditingRoweditorCompgridColorpreferredViewportSizerowHeightrowMarginrowSelectionAllowedselectionBackgroundselectionForegroundselectionModelshowHorizontalLinesshowVerticalLinestableHeader

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
public void
public TableCellRenderer
getCellRenderer(int
the row of the cell to render, where 0 is the first row
row
,
int
the column of the cell to render, where 0 is the first column
column
)

Overrides javax.swing.JTable.getCellRenderer.

This method sets read write rows to be blue, and other rows to be their default rendered colour.
public abstract String
getClassName(int row)

pack-priv Color
pack-priv Color
public int
getSelectedIndex()

This returns the select index as the table was at initialization

public String
getToolTip(int row, int column)

public abstract Object
getValue(int row)

public abstract String
getValueName(int row)

public abstract boolean
isAttributeViewable(int row, int col)

public boolean
isCellDroppable(int row, int col)

public boolean
isCellEditable(int
the row whose value is to be queried
row
,
int
the column whose value is to be queried
col
)

Overrides javax.swing.JTable.isCellEditable.

Returns true if the cell at row and column is editable.
public abstract boolean
isCellError(int row, int col)

public abstract boolean
isColumnEditable(int column)

public abstract boolean
isReadable(int row)

public boolean
isReadWrite(int row)

public abstract boolean
public abstract boolean
isWritable(int row)

public Component
prepareRenderer(TableCellRenderer
the TableCellRenderer to prepare
renderer
,
int
the row of the cell to render, where 0 is the first row
row
,
int
the column of the cell to render, where 0 is the first column
column
)

Overrides javax.swing.JTable.prepareRenderer.

Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.
public abstract void
setTableValue(Object value, int row)

pack-priv void
sortRequested(int
the column against which the rows are sorted
column
)

Called by TableSorter if a mouse event requests to sort the rows.

Inherited from javax.swing.JTable:
addColumnaddColumnSelectionIntervaladdNotifyaddRowSelectionIntervalchangeSelectionclearSelectioncolumnAddedcolumnAtPointcolumnMarginChangedcolumnMovedcolumnRemovedcolumnSelectionChangedconfigureEnclosingScrollPaneconvertColumnIndexToModelconvertColumnIndexToViewconvertRowIndexToModelconvertRowIndexToViewcreateDefaultColumnModelcreateDefaultColumnsFromModelcreateDefaultDataModelcreateDefaultEditorscreateDefaultRendererscreateDefaultSelectionModelcreateDefaultTableHeadercreateScrollPaneForTabledoLayouteditCellAteditCellAteditingCancelededitingStoppedgetAccessibleContextgetAutoCreateColumnsFromModelgetAutoCreateRowSortergetAutoResizeModegetCellEditorgetCellEditorgetCellRectgetCellSelectionEnabledgetColumngetColumnClassgetColumnCountgetColumnModelgetColumnNamegetColumnSelectionAllowedgetDefaultEditorgetDefaultRenderergetDragEnabledgetDropLocationgetDropModegetEditingColumngetEditingRowgetEditorComponentgetFillsViewportHeightgetGridColorgetIntercellSpacinggetModelgetPreferredScrollableViewportSizegetPrintablegetRowCountgetRowHeightgetRowHeightgetRowMargingetRowSelectionAllowedgetRowSortergetScrollableBlockIncrementgetScrollableTracksViewportHeightgetScrollableTracksViewportWidthgetScrollableUnitIncrementgetSelectedColumngetSelectedColumnCountgetSelectedColumnsgetSelectedRowgetSelectedRowCountgetSelectedRowsgetSelectionBackgroundgetSelectionForegroundgetSelectionModelgetShowHorizontalLinesgetShowVerticalLinesgetSurrendersFocusOnKeystrokegetTableHeadergetToolTipTextgetUIgetUIClassIDgetUpdateSelectionOnSortgetValueAtinitializeLocalVarsisCellSelectedisColumnSelectedisEditingisRowSelectedmoveColumnparamStringprepareEditorprintprintprintprintprintprocessKeyBindingremoveColumnremoveColumnSelectionIntervalremoveEditorremoveNotifyremoveRowSelectionIntervalresizeAndRepaintrowAtPointselectAllsetAutoCreateColumnsFromModelsetAutoCreateRowSortersetAutoResizeModesetCellEditorsetCellSelectionEnabledsetColumnModelsetColumnSelectionAllowedsetColumnSelectionIntervalsetDefaultEditorsetDefaultRenderersetDragEnabledsetDropModesetEditingColumnsetEditingRowsetFillsViewportHeightsetGridColorsetIntercellSpacingsetModelsetPreferredScrollableViewportSizesetRowHeightsetRowHeightsetRowMarginsetRowSelectionAllowedsetRowSelectionIntervalsetRowSortersetSelectionBackgroundsetSelectionForegroundsetSelectionModesetSelectionModelsetShowGridsetShowHorizontalLinessetShowVerticalLinessetSurrendersFocusOnKeystrokesetTableHeadersetUIsetUpdateSelectionOnSortsetValueAtsizeColumnsToFitsizeColumnsToFitsorterChangedtableChangedunconfigureEnclosingScrollPaneupdateUIvalueChanged

Field Detail

boldFontback to summary
private Font boldFont
defaultColorback to summary
private Color defaultColor
editableColorback to summary
private Color editableColor
errorColorback to summary
private Color errorColor
NAME_COLUMNback to summary
pack-priv static final int NAME_COLUMN
normalFontback to summary
private Font normalFont
VALUE_COLUMNback to summary
pack-priv static final int VALUE_COLUMN

Constructor Detail

XTableback to summary
public XTable()

Method Detail

convertRowToIndexback to summary
public int convertRowToIndex(int row)
emptyTableback to summary
public void emptyTable()
getCellRendererback to summary
public TableCellRenderer getCellRenderer(int row, int column)

Overrides javax.swing.JTable.getCellRenderer.

This method sets read write rows to be blue, and other rows to be their default rendered colour.

Parameters
row:int

Doc from javax.swing.JTable.getCellRenderer.

the row of the cell to render, where 0 is the first row

column:int

Doc from javax.swing.JTable.getCellRenderer.

the column of the cell to render, where 0 is the first column

Returns:TableCellRenderer

Doc from javax.swing.JTable.getCellRenderer.

the assigned renderer; if null returns the default renderer for this type of object

Annotations
@Override
getClassNameback to summary
public abstract String getClassName(int row)
getDefaultColorback to summary
pack-priv Color getDefaultColor()
getEditableColorback to summary
pack-priv Color getEditableColor()
getSelectedIndexback to summary
public int getSelectedIndex()

This returns the select index as the table was at initialization

getToolTipback to summary
public String getToolTip(int row, int column)
getValueback to summary
public abstract Object getValue(int row)
getValueNameback to summary
public abstract String getValueName(int row)
isAttributeViewableback to summary
public abstract boolean isAttributeViewable(int row, int col)
isCellDroppableback to summary
public boolean isCellDroppable(int row, int col)
isCellEditableback to summary
public boolean isCellEditable(int row, int col)

Overrides javax.swing.JTable.isCellEditable.

Doc from javax.swing.JTable.isCellEditable.

Returns true if the cell at row and column is editable. Otherwise, invoking setValueAt on the cell will have no effect.

Note

The column is specified in the table view's display order, and not in the TableModel's column order. This is an important distinction because as the user rearranges the columns in the table, the column at a given index in the view will change. Meanwhile the user's actions never affect the model's column ordering.

Parameters
row:int

the row whose value is to be queried

col:int

the column whose value is to be queried

Returns:boolean

true if the cell is editable

Annotations
@Override
isCellErrorback to summary
public abstract boolean isCellError(int row, int col)
isColumnEditableback to summary
public abstract boolean isColumnEditable(int column)
isReadableback to summary
public abstract boolean isReadable(int row)
isReadWriteback to summary
public boolean isReadWrite(int row)
isTableEditableback to summary
public abstract boolean isTableEditable()
isWritableback to summary
public abstract boolean isWritable(int row)
prepareRendererback to summary
public Component prepareRenderer(TableCellRenderer renderer, int row, int column)

Overrides javax.swing.JTable.prepareRenderer.

Doc from javax.swing.JTable.prepareRenderer.

Prepares the renderer by querying the data model for the value and selection state of the cell at row, column. Returns the component (may be a Component or a JComponent) under the event location.

During a printing operation, this method will configure the renderer without indicating selection or focus, to prevent them from appearing in the printed output. To do other customizations based on whether or not the table is being printed, you can check the value of javax.swing.JComponent#isPaintingForPrint(), either here or within custom renderers.

Note

Throughout the table package, the internal implementations always use this method to prepare renderers so that this default behavior can be safely overridden by a subclass.

Parameters
renderer:TableCellRenderer

the TableCellRenderer to prepare

row:int

the row of the cell to render, where 0 is the first row

column:int

the column of the cell to render, where 0 is the first column

Returns:Component

the Component under the event location

Annotations
@Override
setTableValueback to summary
public abstract void setTableValue(Object value, int row)
sortRequestedback to summary
pack-priv void sortRequested(int column)

Called by TableSorter if a mouse event requests to sort the rows.

Parameters
column:int

the column against which the rows are sorted