APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.jvm.hotspot.ui

public Class ObjectHistogramPanel

extends JPanel
implements ActionListener
Class Inheritance
All Implemented Interfaces
java.awt.event.ActionListener, java.util.EventListener
Imports
java.util.*, java.awt.*, java.awt.event.*, javax.swing.*, javax.swing.table.*, sun.jvm.hotspot.oops.ObjectHistogram, .ObjectHistogramElement, .Klass, sun.jvm.hotspot.ui.table.LongCellRenderer, .SortableTableModel, .SortHeaderCellRenderer, .SortHeaderMouseAdapter, .TableModelComparator, sun.jvm.hotspot.ui.action.*, com.sun.java.swing.ui.StatusBar, .CommonToolBar, com.sun.java.swing.action.ActionManager, .DelegateAction

Displays the results of an ObjectHistogram run in a JTable, with a button to display all objects of that type

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
private class
private class
ObjectHistogramPanel.ObjectHistogramTableModel

A table model which encapsulates the ObjectHistogram

private class

Field Summary

Modifier and TypeField and Description
private ObjectHistogramPanel.ObjectHistogramTableModel
private List<ObjectHistogramPanel.Listener>
private StatusBar
private JTable
private ObjectHistogramPanel.ObjectHistogramToolBar

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

public void
private void
findObject()

Find and select the row that contains the text in the find field starting from the current selected row.

private void
public static void
main(String[] args)

private void
registerAction(String actionName)

protected void
public void
Inherited from javax.swing.JPanel:
getAccessibleContextgetUIgetUIClassIDparamStringsetUIupdateUI

Field Detail

dataModelback to summary
private ObjectHistogramPanel.ObjectHistogramTableModel dataModel
listenersback to summary
private List<ObjectHistogramPanel.Listener> listeners
statusBarback to summary
private StatusBar statusBar
tableback to summary
private JTable table
toolbarback to summary
private ObjectHistogramPanel.ObjectHistogramToolBar toolbar

Constructor Detail

ObjectHistogramPanelback to summary
public ObjectHistogramPanel(ObjectHistogram histo)

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

addPanelListenerback to summary
public void addPanelListener(ObjectHistogramPanel.Listener listener)
findObjectback to summary
private void findObject()

Find and select the row that contains the text in the find field starting from the current selected row. Uses a linear search from the current row. Could be optimized within the model and internal representation.

fireShowObjectsOfTypeback to summary
private void fireShowObjectsOfType()
mainback to summary
public static void main(String[] args)
registerActionback to summary
private void registerAction(String actionName)
registerActionsback to summary
protected void registerActions()
removePanelListenerback to summary
public void removePanelListener(ObjectHistogramPanel.Listener listener)
sun.jvm.hotspot.ui back to summary

public Interface ObjectHistogramPanel.Listener

Known Direct Implementers
sun.jvm.hotspot.HSDB

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

showObjectsOfTypeback to summary
public void showObjectsOfType(Klass type)
sun.jvm.hotspot.ui back to summary

private Class ObjectHistogramPanel.ObjectHistogramColummModel

extends DefaultTableColumnModel
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final String
Inherited from javax.swing.table.DefaultTableColumnModel:
changeEventcolumnMargincolumnSelectionAllowedlistenerListselectionModeltableColumnstotalColumnWidth

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from javax.swing.table.DefaultTableColumnModel:
addColumnaddColumnModelListenercreateSelectionModelfireColumnAddedfireColumnMarginChangedfireColumnMovedfireColumnRemovedfireColumnSelectionChangedgetColumngetColumnCountgetColumnIndexgetColumnIndexAtXgetColumnMargingetColumnModelListenersgetColumnsgetColumnSelectionAllowedgetListenersgetSelectedColumnCountgetSelectedColumnsgetSelectionModelgetTotalColumnWidthmoveColumnpropertyChangerecalcWidthCacheremoveColumnremoveColumnModelListenersetColumnMarginsetColumnSelectionAllowedsetSelectionModelvalueChanged

Field Detail

LABEL_COUNTback to summary
private final String LABEL_COUNT
LABEL_DESCback to summary
private final String LABEL_DESC
LABEL_SIZEback to summary
private final String LABEL_SIZE

Constructor Detail

ObjectHistogramColummModelback to summary
public ObjectHistogramColummModel()
sun.jvm.hotspot.ui back to summary

private Class ObjectHistogramPanel.ObjectHistogramTableModel

extends SortableTableModel<ObjectHistogramElement>
Class Inheritance

A table model which encapsulates the ObjectHistogram

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private Class<T>[]
private String[]
Inherited from sun.jvm.hotspot.ui.table.SortableTableModel:
elements

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Class<T>
getColumnClass(int col)

Overrides javax.swing.table.AbstractTableModel.getColumnClass.

Implements javax.swing.table.TableModel.getColumnClass.

Returns Object.class regardless of columnIndex.

public int
getColumnCount()

Implements javax.swing.table.TableModel.getColumnCount.

Returns the number of columns in the model.

public String
getColumnName(int col)

Overrides javax.swing.table.AbstractTableModel.getColumnName.

Implements javax.swing.table.TableModel.getColumnName.

Returns a default name for the column using spreadsheet conventions: A, B, C, ...

public ObjectHistogramElement
getElement(int index)

public int
getRowCount()

Implements javax.swing.table.TableModel.getRowCount.

Returns the number of rows in the model.

public Object
getValueAt(int row, int col)

Implements javax.swing.table.TableModel.getValueAt.

Returns the value for the cell at columnIndex and rowIndex.

public Comparable<?>
getValueForColumn(Object obj, int col)

Inherited from sun.jvm.hotspot.ui.table.SortableTableModel:
getColumnisAscendingsetComparatorsortByColumn

Field Detail

columnClassesback to summary
private Class<T>[] columnClasses
columnNamesback to summary
private String[] columnNames

Constructor Detail

ObjectHistogramTableModelback to summary
public ObjectHistogramTableModel(ObjectHistogram histo)

Method Detail

getColumnClassback to summary
public Class<T> getColumnClass(int col)

Overrides javax.swing.table.AbstractTableModel.getColumnClass.

Implements javax.swing.table.TableModel.getColumnClass.

Doc from javax.swing.table.AbstractTableModel.getColumnClass.

Returns Object.class regardless of columnIndex.

getColumnCountback to summary
public int getColumnCount()

Implements javax.swing.table.TableModel.getColumnCount.

Doc from javax.swing.table.TableModel.getColumnCount.

Returns the number of columns in the model. A JTable uses this method to determine how many columns it should create and display by default.

getColumnNameback to summary
public String getColumnName(int col)

Overrides javax.swing.table.AbstractTableModel.getColumnName.

Implements javax.swing.table.TableModel.getColumnName.

Doc from javax.swing.table.AbstractTableModel.getColumnName.

Returns a default name for the column using spreadsheet conventions: A, B, C, ... Z, AA, AB, etc. If column cannot be found, returns an empty string.

getElementback to summary
public ObjectHistogramElement getElement(int index)
getRowCountback to summary
public int getRowCount()

Implements javax.swing.table.TableModel.getRowCount.

Doc from javax.swing.table.TableModel.getRowCount.

Returns the number of rows in the model. A JTable uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.

getValueAtback to summary
public Object getValueAt(int row, int col)

Implements javax.swing.table.TableModel.getValueAt.

Doc from javax.swing.table.TableModel.getValueAt.

Returns the value for the cell at columnIndex and rowIndex.

getValueForColumnback to summary
public Comparable<?> getValueForColumn(Object obj, int col)
sun.jvm.hotspot.ui back to summary

private Class ObjectHistogramPanel.ObjectHistogramTableModel.ObjectHistogramComparator

extends TableModelComparator
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Comparable<?>
getValueForColumn(Object
Object that was passed for Comparator
obj
,
int
the column to retrieve
column
)

Implements abstract sun.jvm.hotspot.ui.table.TableModelComparator.getValueForColumn.

Returns the value for the comparing object for the column.

Inherited from sun.jvm.hotspot.ui.table.TableModelComparator:
addColumncomparegetColumnisAscendingsetAscending

Constructor Detail

ObjectHistogramComparatorback to summary
public ObjectHistogramComparator(ObjectHistogramPanel.ObjectHistogramTableModel model)

Method Detail

getValueForColumnback to summary
public Comparable<?> getValueForColumn(Object obj, int column)

Implements abstract sun.jvm.hotspot.ui.table.TableModelComparator.getValueForColumn.

Returns the value for the comparing object for the column.

Parameters
obj:Object

Object that was passed for Comparator

column:int

the column to retrieve

sun.jvm.hotspot.ui back to summary

private Class ObjectHistogramPanel.ObjectHistogramToolBar

extends CommonToolBar
Class Inheritance

Field Summary

Modifier and TypeField and Description
private JTextField
Inherited from com.sun.java.swing.ui.CommonToolBar:
manager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
public String
Inherited from com.sun.java.swing.ui.CommonToolBar:
addButtonaddToggleButtonaddToggleButtonconfigureButtonconfigureToggleButton

Field Detail

searchTFback to summary
private JTextField searchTF

Constructor Detail

ObjectHistogramToolBarback to summary
public ObjectHistogramToolBar(StatusBar status)

Method Detail

addComponentsback to summary
protected void addComponents()

Implements abstract com.sun.java.swing.ui.CommonToolBar.addComponents.

getFindTextback to summary
public String getFindText()