本文整理汇总了Java中sun.jvm.hotspot.oops.ObjectHistogram类的典型用法代码示例。如果您正苦于以下问题:Java ObjectHistogram类的具体用法?Java ObjectHistogram怎么用?Java ObjectHistogram使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectHistogram类属于sun.jvm.hotspot.oops包,在下文中一共展示了ObjectHistogram类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ObjectHistogramPanel
import sun.jvm.hotspot.oops.ObjectHistogram; //导入依赖的package包/类
public ObjectHistogramPanel(ObjectHistogram histo) {
dataModel = new ObjectHistogramTableModel(histo);
statusBar = new StatusBar();
table = new JTable(dataModel, new ObjectHistogramColummModel());
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
if (evt.getClickCount() == 2) {
fireShowObjectsOfType();
}
}
});
JTableHeader header = table.getTableHeader();
header.setDefaultRenderer(new SortHeaderCellRenderer(header, dataModel));
header.addMouseListener(new SortHeaderMouseAdapter(table, dataModel));
setLayout(new BorderLayout());
toolbar = new ObjectHistogramToolBar(statusBar);
add(toolbar, BorderLayout.NORTH);
add(new JScrollPane(table), BorderLayout.CENTER);
add(statusBar, BorderLayout.SOUTH);
registerActions();
}
示例2: ObjectHistogramTableModel
import sun.jvm.hotspot.oops.ObjectHistogram; //导入依赖的package包/类
public ObjectHistogramTableModel(ObjectHistogram histo) {
// Set the rows
elements = histo.getElements();
setComparator(new ObjectHistogramComparator(this));
}