public class

XMBeanAttributes

extends XTable
java.lang.Object
   ↳ java.awt.Component
     ↳ java.awt.Container
       ↳ javax.swing.JComponent
         ↳ javax.swing.JTable
           ↳ sun.tools.jconsole.inspector.XTable
             ↳ sun.tools.jconsole.inspector.XMBeanAttributes

Summary

[Expand]
Inherited Constants
From class javax.swing.JTable
From class javax.swing.JComponent
From class java.awt.Component
From interface java.awt.image.ImageObserver
[Expand]
Inherited Fields
From class javax.swing.JTable
From class javax.swing.JComponent
Public Constructors
XMBeanAttributes(MBeansTab mbeansTab)
Public Methods
void cancelCellEditing()
final boolean editCellAt(int row, int column, EventObject e)
Programmatically starts editing the cell at row and column, if those indices are in the valid range, and the cell at those indices is editable.
void emptyTable()
synchronized TableCellRenderer getCellRenderer(int row, int column)
This method sets read write rows to be blue, and other rows to be their default rendered colour.
String getClassName(int row)
synchronized int getRowCount()
Override JTable method in order to make any call to this method atomic with TableModel elements.
String getToolTip(int row, int column)
Object getValue(int row)
String getValueName(int row)
synchronized boolean isAttributeViewable(int row, int col)
boolean isCellEditable(int row, int col)
Returns true if the cell at row and column is editable.
synchronized boolean isCellError(int row, int col)
boolean isColumnEditable(int column)
synchronized boolean isReadable(int row)
boolean isTableEditable()
synchronized boolean isWritable(int row)
void loadAttributes(XMBean mbean, MBeanInfo mbeanInfo)
synchronized Component prepareRenderer(TableCellRenderer renderer, int row, int column)
Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.
void refreshAttributes()
void setTableValue(Object value, int row)
void setValueAt(Object value, int row, int column)
Sets the value for the cell in the table model at row and column.
void stopCellEditing()
Protected Methods
void addTableData(DefaultTableModel tableModel, XMBean mbean, MBeanAttributeInfo[] attributesInfo, HashMap<StringObject> attributes, HashMap<StringObject> unavailableAttributes, HashMap<StringObject> viewableAttributes)
[Expand]
Inherited Methods
From class sun.tools.jconsole.inspector.XTable
From class javax.swing.JTable
From class javax.swing.JComponent
From class java.awt.Container
From class java.awt.Component
From class java.lang.Object
From interface java.awt.MenuContainer
From interface java.awt.image.ImageObserver
From interface javax.accessibility.Accessible
From interface javax.swing.Scrollable
From interface javax.swing.event.CellEditorListener
From interface javax.swing.event.ListSelectionListener
From interface javax.swing.event.RowSorterListener
From interface javax.swing.event.TableColumnModelListener
From interface javax.swing.event.TableModelListener

Public Constructors

public XMBeanAttributes (MBeansTab mbeansTab)

Public Methods

public void cancelCellEditing ()

public final boolean editCellAt (int row, int column, EventObject e)

Programmatically starts editing the cell at row and column, if those indices are in the valid range, and the cell at those indices is editable. To prevent the JTable from editing a particular table, column or cell value, return false from the isCellEditable method in the TableModel interface.

Parameters
row the row to be edited
column the column to be edited
e event to pass into shouldSelectCell; note that as of Java 2 platform v1.2, the call to shouldSelectCell is no longer made
Returns
  • false if for any reason the cell cannot be edited, or if the indices are invalid

public void emptyTable ()

public synchronized TableCellRenderer getCellRenderer (int row, int column)

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

Parameters
row the row of the cell to render, where 0 is the first row
column the column of the cell to render, where 0 is the first column
Returns
  • the assigned renderer; if null returns the default renderer for this type of object

public String getClassName (int row)

public synchronized int getRowCount ()

Override JTable method in order to make any call to this method atomic with TableModel elements.

Returns
  • the number of rows shown in the JTable

public String getToolTip (int row, int column)

public Object getValue (int row)

public String getValueName (int row)

public synchronized boolean isAttributeViewable (int row, int col)

public boolean isCellEditable (int row, int col)

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 the row whose value is to be queried
col the column whose value is to be queried
Returns
  • true if the cell is editable

public synchronized boolean isCellError (int row, int col)

public boolean isColumnEditable (int column)

public synchronized boolean isReadable (int row)

public boolean isTableEditable ()

public synchronized boolean isWritable (int row)

public void loadAttributes (XMBean mbean, MBeanInfo mbeanInfo)

public synchronized Component prepareRenderer (TableCellRenderer renderer, int row, int column)

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 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 the TableCellRenderer to prepare
row the row of the cell to render, where 0 is the first row
column the column of the cell to render, where 0 is the first column
Returns
  • the Component under the event location

public void refreshAttributes ()

public void setTableValue (Object value, int row)

public void setValueAt (Object value, int row, int column)

Sets the value for the cell in the table model at row and column.

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. aValue is the new value.

Parameters
value the new value
row the row of the cell to be changed
column the column of the cell to be changed

public void stopCellEditing ()

Protected Methods

protected void addTableData (DefaultTableModel tableModel, XMBean mbean, MBeanAttributeInfo[] attributesInfo, HashMap<StringObject> attributes, HashMap<StringObject> unavailableAttributes, HashMap<StringObject> viewableAttributes)