APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.tools.jconsole.inspector

public Class XMBeanNotifications

extends JTable
implements NotificationListener
Class Inheritance
All Implemented Interfaces
javax.management.NotificationListener, java.util.EventListener
Annotations
@SuppressWarnings:serial
Imports
javax.swing.*, javax.swing.table.*, javax.swing.tree.*, java.awt.Font, .Component, .EventQueue, .Dimension, java.text.SimpleDateFormat, java.awt.event.*, java.util.*, java.io.*, java.lang.reflect.Array, javax.management.*, javax.management.openmbean.CompositeData, .TabularData, sun.tools.jconsole.JConsole, .Messages

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv static class
pack-priv class
pack-priv static class
pack-priv class

Field Summary

Modifier and TypeField and Description
private Font
private static final String[]
private XMBeanNotifications.XMBeanNotificationsListener
private static TableCellEditor
private volatile boolean
private HashMap<ObjectName, XMBeanNotifications.XMBeanNotificationsListener>
private XMBeanNotifications.NotifMouseListener
private Font
public static final String
private List<NotificationListener>
private int
private volatile boolean
private SimpleDateFormat
private TableCellEditor
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 void
public void
public synchronized boolean
public JToolTip
createToolTip()

Overrides javax.swing.JComponent.createToolTip.

Returns the instance of JToolTip that should be used to display the tooltip.

public synchronized void
pack-priv synchronized void
public synchronized void
pack-priv void
public synchronized TableCellRenderer
getCellRenderer(int row, int column)

Overrides javax.swing.JTable.getCellRenderer.

Returns an appropriate renderer for the cell specified by this row and column.

public long
private XMBeanNotifications.UserDataCell
getUserDataCell(int row, int column)

public synchronized void
handleNotification(Notification notif, Object handback)

Implements javax.management.NotificationListener.handleNotification.

Invoked when a JMX notification occurs.

public boolean
isCellEditable(int row, int col)

Overrides javax.swing.JTable.isCellEditable.

Returns true if the cell at row and column is editable.

public synchronized boolean
public boolean
public synchronized void
public synchronized Component
prepareRenderer(TableCellRenderer renderer, int row, int 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 synchronized void
public void
private void
public void
setValueAt(Object value, int row, int column)

Overrides javax.swing.JTable.setValueAt.

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

public void
private synchronized boolean
public synchronized boolean
private void
pack-priv synchronized void
updateUserDataCell(int row, int col)

Inherited from javax.swing.JTable:
addColumnaddColumnSelectionIntervaladdNotifyaddRowSelectionIntervalchangeSelectionclearSelectioncolumnAddedcolumnAtPointcolumnMarginChangedcolumnMovedcolumnRemovedcolumnSelectionChangedconfigureEnclosingScrollPaneconvertColumnIndexToModelconvertColumnIndexToViewconvertRowIndexToModelconvertRowIndexToViewcreateDefaultColumnModelcreateDefaultColumnsFromModelcreateDefaultDataModelcreateDefaultEditorscreateDefaultRendererscreateDefaultSelectionModelcreateDefaultTableHeadercreateScrollPaneForTabledoLayouteditCellAteditCellAteditingCancelededitingStoppedgetAccessibleContextgetAutoCreateColumnsFromModelgetAutoCreateRowSortergetAutoResizeModegetCellEditorgetCellEditorgetCellRectgetCellSelectionEnabledgetColumngetColumnClassgetColumnCountgetColumnModelgetColumnNamegetColumnSelectionAllowedgetDefaultEditorgetDefaultRenderergetDragEnabledgetDropLocationgetDropModegetEditingColumngetEditingRowgetEditorComponentgetFillsViewportHeightgetGridColorgetIntercellSpacinggetModelgetPreferredScrollableViewportSizegetPrintablegetRowCountgetRowHeightgetRowHeightgetRowMargingetRowSelectionAllowedgetRowSortergetScrollableBlockIncrementgetScrollableTracksViewportHeightgetScrollableTracksViewportWidthgetScrollableUnitIncrementgetSelectedColumngetSelectedColumnCountgetSelectedColumnsgetSelectedRowgetSelectedRowCountgetSelectedRowsgetSelectionBackgroundgetSelectionForegroundgetSelectionModelgetShowHorizontalLinesgetShowVerticalLinesgetSurrendersFocusOnKeystrokegetTableHeadergetToolTipTextgetUIgetUIClassIDgetUpdateSelectionOnSortgetValueAtinitializeLocalVarsisCellSelectedisColumnSelectedisEditingisRowSelectedmoveColumnparamStringprepareEditorprintprintprintprintprintprocessKeyBindingremoveColumnremoveColumnSelectionIntervalremoveEditorremoveNotifyremoveRowSelectionIntervalresizeAndRepaintrowAtPointselectAllsetAutoCreateColumnsFromModelsetAutoCreateRowSortersetAutoResizeModesetCellEditorsetCellSelectionEnabledsetColumnModelsetColumnSelectionAllowedsetColumnSelectionIntervalsetDefaultEditorsetDefaultRenderersetDragEnabledsetDropModesetEditingColumnsetEditingRowsetFillsViewportHeightsetGridColorsetIntercellSpacingsetModelsetPreferredScrollableViewportSizesetRowHeightsetRowHeightsetRowMarginsetRowSelectionAllowedsetRowSelectionIntervalsetRowSortersetSelectionBackgroundsetSelectionForegroundsetSelectionModesetSelectionModelsetShowGridsetShowHorizontalLinessetShowVerticalLinessetSurrendersFocusOnKeystrokesetTableHeadersetUIsetUpdateSelectionOnSortsizeColumnsToFitsizeColumnsToFitsorterChangedtableChangedunconfigureEnclosingScrollPaneupdateUIvalueChanged

Field Detail

boldFontback to summary
private Font boldFont
columnNamesback to summary
private static final String[] columnNames
currentListenerback to summary
private XMBeanNotifications.XMBeanNotificationsListener currentListener
editorback to summary
private static TableCellEditor editor
enabledback to summary
private volatile boolean enabled

Hides java.awt.Component.enabled.

listenersback to summary
private HashMap<ObjectName, XMBeanNotifications.XMBeanNotificationsListener> listeners
mouseListenerback to summary
private XMBeanNotifications.NotifMouseListener mouseListener

Hides java.awt.Component.mouseListener.

normalFontback to summary
private Font normalFont
NOTIFICATION_RECEIVED_EVENTback to summary
public static final String NOTIFICATION_RECEIVED_EVENT
notificationListenersListback to summary
private List<NotificationListener> notificationListenersList
rowMinHeightback to summary
private int rowMinHeight
subscribedback to summary
private volatile boolean subscribed
timeFormaterback to summary
private SimpleDateFormat timeFormater
userDataEditorback to summary
private TableCellEditor userDataEditor

Constructor Detail

XMBeanNotificationsback to summary
public XMBeanNotifications()

Method Detail

addNotificationsListenerback to summary
public void addNotificationsListener(NotificationListener nl)
cancelCellEditingback to summary
public void cancelCellEditing()
clearCurrentNotificationsback to summary
public synchronized boolean clearCurrentNotifications()
createToolTipback to summary
public JToolTip createToolTip()

Overrides javax.swing.JComponent.createToolTip.

Doc from javax.swing.JComponent.createToolTip.

Returns the instance of JToolTip that should be used to display the tooltip. Components typically would not override this method, but it can be used to cause different tooltips to be displayed differently.

Annotations
@Override
disableNotificationsback to summary
public synchronized void disableNotifications()
disposeback to summary
pack-priv synchronized void dispose()
emptyTableback to summary
public synchronized void emptyTable()
fireNotificationReceivedback to summary
pack-priv void fireNotificationReceived(XMBeanNotifications.XMBeanNotificationsListener listener, XMBean mbean, DefaultMutableTreeNode node, Object[] rowData, long received)
getCellRendererback to summary
public synchronized TableCellRenderer getCellRenderer(int row, int column)

Overrides javax.swing.JTable.getCellRenderer.

Doc from javax.swing.JTable.getCellRenderer.

Returns an appropriate renderer for the cell specified by this row and column. If the TableColumn for this column has a non-null renderer, returns that. If not, finds the class of the data in this column (using getColumnClass) and returns the default renderer for this type of data.

Note

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

Annotations
@Override
getReceivedNotificationsback to summary
public long getReceivedNotifications(XMBean mbean)
getUserDataCellback to summary
private XMBeanNotifications.UserDataCell getUserDataCell(int row, int column)
handleNotificationback to summary
public synchronized void handleNotification(Notification notif, Object handback)

Implements javax.management.NotificationListener.handleNotification.

Doc from javax.management.NotificationListener.handleNotification.

Invoked when a JMX notification occurs. The implementation of this method should return as soon as possible, to avoid blocking its notification broadcaster.

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.

Annotations
@Override
isListenerRegisteredback to summary
public synchronized boolean isListenerRegistered(XMBean mbean)
isTableEditableback to summary
public boolean isTableEditable()
loadNotificationsback to summary
public synchronized void loadNotifications(XMBean mbean)
prepareRendererback to summary
public synchronized 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.

Annotations
@Override
registerListenerback to summary
public synchronized void registerListener(DefaultMutableTreeNode node) throws InstanceNotFoundException, IOException
removeNotificationsListenerback to summary
public void removeNotificationsListener(NotificationListener nl)
setColumnEditorsback to summary
private void setColumnEditors()
setValueAtback to summary
public void setValueAt(Object value, int row, int column)

Overrides javax.swing.JTable.setValueAt.

Doc from javax.swing.JTable.setValueAt.

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.

Annotations
@Override
stopCellEditingback to summary
public void stopCellEditing()
unregisterback to summary
private synchronized boolean unregister(ObjectName mbean)
unregisterListenerback to summary
public synchronized boolean unregisterListener(DefaultMutableTreeNode node)
updateModelback to summary
private void updateModel(List<Object[]> data)
updateUserDataCellback to summary
pack-priv synchronized void updateUserDataCell(int row, int col)
sun.tools.jconsole.inspector back to summary

pack-priv Class XMBeanNotifications.NotifMouseListener

extends MouseAdapter
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
mousePressed(MouseEvent e)

Overrides java.awt.event.MouseAdapter.mousePressed.

Implements java.awt.event.MouseListener.mousePressed.

Invoked when a mouse button has been pressed on a component.

Inherited from java.awt.event.MouseAdapter:
mouseClickedmouseDraggedmouseEnteredmouseExitedmouseMovedmouseReleasedmouseWheelMoved

Constructor Detail

NotifMouseListenerback to summary
pack-priv NotifMouseListener()

Method Detail

mousePressedback to summary
public void mousePressed(MouseEvent e)

Overrides java.awt.event.MouseAdapter.mousePressed.

Implements java.awt.event.MouseListener.mousePressed.

Doc from java.awt.event.MouseAdapter.mousePressed.

Invoked when a mouse button has been pressed on a component.

Annotations
@Override
sun.tools.jconsole.inspector back to summary

pack-priv Class XMBeanNotifications.UserDataCell

extends Object
Class Inheritance
  • java.lang.Object
  • sun.tools.jconsole.inspector.XMBeanNotifications.UserDataCell

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv XMBeanNotifications.UserDataCellRenderer
pack-priv int
pack-priv boolean
pack-priv TableCellRenderer
pack-priv Object

Constructor Summary

AccessConstructor and Description
pack-priv
UserDataCell(Object userData, Component max)

Method Summary

Modifier and TypeMethod and Description
pack-priv int
pack-priv TableCellRenderer
pack-priv void
init(TableCellRenderer minRenderer, int minHeight)

pack-priv boolean
pack-priv boolean
pack-priv void
pack-priv void
pack-priv void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

initback to summary
pack-priv boolean init
maxRendererback to summary
pack-priv XMBeanNotifications.UserDataCellRenderer maxRenderer
minHeightback to summary
pack-priv int minHeight
minimizedback to summary
pack-priv boolean minimized
minRendererback to summary
pack-priv TableCellRenderer minRenderer
userDataback to summary
pack-priv Object userData

Constructor Detail

UserDataCellback to summary
pack-priv UserDataCell(Object userData, Component max)

Method Detail

getHeightback to summary
pack-priv int getHeight()
getRendererback to summary
pack-priv TableCellRenderer getRenderer()
initback to summary
pack-priv void init(TableCellRenderer minRenderer, int minHeight)
isInitedback to summary
pack-priv boolean isInited()
isMaximizedback to summary
pack-priv boolean isMaximized()
maximizeback to summary
pack-priv void maximize()
minimizeback to summary
pack-priv void minimize()
switchStateback to summary
pack-priv void switchState()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
sun.tools.jconsole.inspector back to summary

pack-priv Class XMBeanNotifications.UserDataCellEditor

extends XTextFieldEditor
Class Inheritance

Field Summary

Inherited from sun.tools.jconsole.inspector.XTextFieldEditor:
changeEventevtListenerList

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Component
getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)

Overrides sun.tools.jconsole.inspector.XTextFieldEditor.getTableCellEditorComponent.

Implements javax.swing.table.TableCellEditor.getTableCellEditorComponent.

Sets an initial value for the editor.

public boolean
stopCellEditing()

Overrides sun.tools.jconsole.inspector.XTextFieldEditor.stopCellEditing.

Implements javax.swing.CellEditor.stopCellEditing.

Tells the editor to stop editing and accept any partially edited value as the value of the editor.

Inherited from sun.tools.jconsole.inspector.XTextFieldEditor:
actionPerformedaddCellEditorListenercancelCellEditingdropSuccessfireEditingCanceledfireEditingStoppedgetCellEditorValueisCellEditableremoveCellEditorListenershouldSelectCell

Constructor Detail

UserDataCellEditorback to summary
pack-priv UserDataCellEditor()

Method Detail

getTableCellEditorComponentback to summary
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)

Overrides sun.tools.jconsole.inspector.XTextFieldEditor.getTableCellEditorComponent.

Implements javax.swing.table.TableCellEditor.getTableCellEditorComponent.

Doc from javax.swing.table.TableCellEditor.getTableCellEditorComponent.

Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Annotations
@Override
stopCellEditingback to summary
public boolean stopCellEditing()

Overrides sun.tools.jconsole.inspector.XTextFieldEditor.stopCellEditing.

Implements javax.swing.CellEditor.stopCellEditing.

Doc from javax.swing.CellEditor.stopCellEditing.

Tells the editor to stop editing and accept any partially edited value as the value of the editor. The editor returns false if editing was not stopped; this is useful for editors that validate and can not accept invalid entries.

Annotations
@Override
sun.tools.jconsole.inspector back to summary

pack-priv Class XMBeanNotifications.UserDataCellRenderer

extends DefaultTableCellRenderer
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv Component
Inherited from javax.swing.table.DefaultTableCellRenderer:
noFocusBorder

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Component
public Component
getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)

Overrides javax.swing.table.DefaultTableCellRenderer.getTableCellRendererComponent.

Implements javax.swing.table.TableCellRenderer.getTableCellRendererComponent.

Returns the default table cell renderer.

Inherited from javax.swing.table.DefaultTableCellRenderer:
firePropertyChangefirePropertyChangeinvalidateisOpaquerepaintrepaintrepaintrevalidatesetBackgroundsetForegroundsetValueupdateUIvalidate

Field Detail

compback to summary
pack-priv Component comp

Constructor Detail

UserDataCellRendererback to summary
pack-priv UserDataCellRenderer(Component comp)

Method Detail

getComponentback to summary
public Component getComponent()
getTableCellRendererComponentback to summary
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)

Overrides javax.swing.table.DefaultTableCellRenderer.getTableCellRendererComponent.

Implements javax.swing.table.TableCellRenderer.getTableCellRendererComponent.

Doc from javax.swing.table.DefaultTableCellRenderer.getTableCellRendererComponent.

Returns the default table cell renderer.

During a printing operation, this method will be called with isSelected and hasFocus values of false to prevent selection and focus from appearing in the printed output. To do other customization based on whether or not the table is being printed, check the return value from javax.swing.JComponent#isPaintingForPrint().

Annotations
@Override
sun.tools.jconsole.inspector back to summary

pack-priv Class XMBeanNotifications.XMBeanNotificationsListener

extends Object
implements NotificationListener
Class Inheritance
  • java.lang.Object
  • sun.tools.jconsole.inspector.XMBeanNotifications.XMBeanNotificationsListener
All Implemented Interfaces
javax.management.NotificationListener, java.util.EventListener

Field Summary

Modifier and TypeField and Description
private ArrayList<Object[]>
private DefaultMutableTreeNode
private XMBeanNotifications
private volatile long
private volatile boolean
private XMBean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
public synchronized List<Object[]>
public synchronized long
public synchronized void
handleNotification(final Notification n, Object hb)

Implements javax.management.NotificationListener.handleNotification.

Invoked when a JMX notification occurs.

public synchronized boolean
public synchronized void
public synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databack to summary
private ArrayList<Object[]> data
nodeback to summary
private DefaultMutableTreeNode node
notificationsback to summary
private XMBeanNotifications notifications
receivedback to summary
private volatile long received
unregisteredback to summary
private volatile boolean unregistered
xmbeanback to summary
private XMBean xmbean

Constructor Detail

XMBeanNotificationsListenerback to summary
public XMBeanNotificationsListener(XMBeanNotifications notifications, XMBean xmbean, DefaultMutableTreeNode node, String[] columnNames)

Method Detail

clearback to summary
public synchronized void clear()
getDataback to summary
public synchronized List<Object[]> getData()
getReceivedNotificationsback to summary
public synchronized long getReceivedNotifications()
handleNotificationback to summary
public synchronized void handleNotification(final Notification n, Object hb)

Implements javax.management.NotificationListener.handleNotification.

Doc from javax.management.NotificationListener.handleNotification.

Invoked when a JMX notification occurs. The implementation of this method should return as soon as possible, to avoid blocking its notification broadcaster.

isRegisteredback to summary
public synchronized boolean isRegistered()
registerback to summary
public synchronized void register(DefaultMutableTreeNode node)
unregisterback to summary
public synchronized void unregister()