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

public Class JavaThreadsPanel

extends SAPanel
implements ActionListener
Class Inheritance
All Implemented Interfaces
java.awt.event.ActionListener, java.util.EventListener
Imports
java.awt.BorderLayout, .Dimension, java.awt.event.*, java.io.*, java.util.*, javax.swing.*, javax.swing.event.ListSelectionEvent, .ListSelectionListener, javax.swing.table.*, sun.jvm.hotspot.debugger.*, sun.jvm.hotspot.runtime.*, sun.jvm.hotspot.types.*, sun.jvm.hotspot.ui.action.*, com.sun.java.swing.ui.*, com.sun.java.swing.action.*, sun.jvm.hotspot.utilities.Observable, .Observer

This panel contains a JTable which displays the list of Java threads as their native thread identifiers combined with their Java names. It allows selection and examination of any of the threads.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
private class
JavaThreadsPanel.JavaThreadsTableModel

Encapsulates the set of threads in a table model

private class
private class
JavaThreadsPanel.ThreadPanel

A splitpane panel which contains the thread table and the Thread Info.

Field Summary

Modifier and TypeField and Description
private List<JavaThreadsPanel.CachedThread>
private static AddressField
private JavaThreadsPanel.JavaThreadsTableModel
private StatusBar
private JTable
Inherited from sun.jvm.hotspot.ui.SAPanel:
listeners

Constructor Summary

AccessConstructor and Description
public
JavaThreadsPanel()

Constructor assumes the threads panel is created while the VM is suspended.

Method Summary

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

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

private void
private void
private void
private boolean

Returns:

a flag which indicates if crashes were encountered.
fireShowThreadCrashes
()

Shows stack memory for threads which have crashed (defined as having taken a signal above a Java frame)

private void
private void
private void
private static void
private void
registerAction(String actionName)

protected void
Inherited from sun.jvm.hotspot.ui.SAPanel:
addPanelListenerremovePanelListenershowCodeViewershowInspectorshowInspectorshowJavaStackTraceshowThreadInfoshowThreadOopInspectorshowThreadStackMemory

Field Detail

cachedThreadsback to summary
private List<JavaThreadsPanel.CachedThread> cachedThreads
crashThreadback to summary
private static AddressField crashThread
dataModelback to summary
private JavaThreadsPanel.JavaThreadsTableModel dataModel
statusBarback to summary
private StatusBar statusBar
threadTableback to summary
private JTable threadTable

Constructor Detail

JavaThreadsPanelback to summary
public JavaThreadsPanel()

Constructor assumes the threads panel is created while the VM is suspended. Subsequent resume and suspend operations of the VM will cause the threads panel to clear and fill itself back in, respectively.

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.

cacheback to summary
private void cache()
decacheback to summary
private void decache()
fireShowJavaStackTraceback to summary
private void fireShowJavaStackTrace()
fireShowThreadCrashesback to summary
private boolean fireShowThreadCrashes()

Shows stack memory for threads which have crashed (defined as having taken a signal above a Java frame)

Returns:boolean

a flag which indicates if crashes were encountered.

fireShowThreadInfoback to summary
private void fireShowThreadInfo()
fireShowThreadOopInspectorback to summary
private void fireShowThreadOopInspector()
fireShowThreadStackMemoryback to summary
private void fireShowThreadStackMemory()
initializeback to summary
private static void initialize(TypeDataBase db)
registerActionback to summary
private void registerAction(String actionName)
registerActionsback to summary
protected void registerActions()
sun.jvm.hotspot.ui back to summary

private Class JavaThreadsPanel.CachedThread

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private boolean
private JavaThread
private String
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
public JavaThread
public String
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

computedback to summary
private boolean computed
threadback to summary
private JavaThread thread
threadIDback to summary
private String threadID
threadNameback to summary
private String threadName

Constructor Detail

CachedThreadback to summary
public CachedThread(JavaThread thread)

Method Detail

computeback to summary
private void compute()
getThreadback to summary
public JavaThread getThread()
getThreadIDback to summary
public String getThreadID()
getThreadNameback to summary
public String getThreadName()
sun.jvm.hotspot.ui back to summary

private Class JavaThreadsPanel.JavaThreadsColumnModel

extends DefaultTableColumnModel
Class Inheritance

Field Summary

Modifier and TypeField and Description
private 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

columnNamesback to summary
private String[] columnNames

Constructor Detail

JavaThreadsColumnModelback to summary
public JavaThreadsColumnModel()
sun.jvm.hotspot.ui back to summary

private Class JavaThreadsPanel.JavaThreadsTableModel

extends AbstractTableModel
Class Inheritance

Encapsulates the set of threads in a table model

Field Summary

Modifier and TypeField and Description
private String[]
private List<JavaThreadsPanel.CachedThread>
Inherited from javax.swing.table.AbstractTableModel:
listenerList

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
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 JavaThread
getJavaThread(int index)

Returns the selected Java Thread indexed by the row or null.

private JavaThreadsPanel.CachedThread
getRow(int row)

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.

private String
threadIDAt(int index)

private String
threadNameAt(int index)

Inherited from javax.swing.table.AbstractTableModel:
addTableModelListenerfindColumnfireTableCellUpdatedfireTableChangedfireTableDataChangedfireTableRowsDeletedfireTableRowsInsertedfireTableRowsUpdatedfireTableStructureChangedgetColumnClassgetListenersgetTableModelListenersisCellEditableremoveTableModelListenersetValueAt

Field Detail

columnNamesback to summary
private String[] columnNames
elementsback to summary
private List<JavaThreadsPanel.CachedThread> elements

Constructor Detail

JavaThreadsTableModelback to summary
public JavaThreadsTableModel(List<JavaThreadsPanel.CachedThread> threads)

Method Detail

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.

getJavaThreadback to summary
public JavaThread getJavaThread(int index)

Returns the selected Java Thread indexed by the row or null.

getRowback to summary
private JavaThreadsPanel.CachedThread getRow(int row)
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.

threadIDAtback to summary
private String threadIDAt(int index)
threadNameAtback to summary
private String threadNameAt(int index)
sun.jvm.hotspot.ui back to summary

private Class JavaThreadsPanel.JavaThreadsToolBar

extends CommonToolBar
Class Inheritance

Field Summary

Inherited from com.sun.java.swing.ui.CommonToolBar:
manager

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Constructor Detail

JavaThreadsToolBarback to summary
public JavaThreadsToolBar(StatusBar status)

Method Detail

addComponentsback to summary
protected void addComponents()

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

sun.jvm.hotspot.ui back to summary

private Class JavaThreadsPanel.ThreadPanel

extends JPanel
Class Inheritance

A splitpane panel which contains the thread table and the Thread Info. the thread info is toggleable

Field Summary

Modifier and TypeField and Description
private boolean
private int
private int
private JSplitPane
private ThreadInfoPanel
private JTable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
private boolean
isInfoVisible()

Returns a flag to indicate if the thread info is visible

private void
setActionsEnabled(boolean enabled)

private void
private void
Inherited from javax.swing.JPanel:
getAccessibleContextgetUIgetUIClassIDparamStringsetUIupdateUI

Field Detail

actionsEnabledback to summary
private boolean actionsEnabled
dividerLocationback to summary
private int dividerLocation
dividerSizeback to summary
private int dividerSize
splitPaneback to summary
private JSplitPane splitPane
threadInfoback to summary
private ThreadInfoPanel threadInfo
threadTableback to summary
private JTable threadTable

Constructor Detail

ThreadPanelback to summary
public ThreadPanel(JTable table)

Method Detail

hideOutputPaneback to summary
private void hideOutputPane()
isInfoVisibleback to summary
private boolean isInfoVisible()

Returns a flag to indicate if the thread info is visible

setActionsEnabledback to summary
private void setActionsEnabled(boolean enabled)
showCurrentThreadInfoback to summary
private void showCurrentThreadInfo()
showOutputPaneback to summary
private void showOutputPane()