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

public Class ConnectDialog

extends InternalDialog
implements DocumentListener, FocusListener, ItemListener, ListSelectionListener, KeyListener
Class Inheritance
All Implemented Interfaces
java.awt.event.KeyListener, java.util.EventListener, javax.swing.event.ListSelectionListener, java.awt.event.ItemListener, java.awt.event.FocusListener, javax.swing.event.DocumentListener
Annotations
@SuppressWarnings:serial
Imports
java.util.List, java.util.*, java.awt.*, java.awt.event.*, javax.swing.*, javax.swing.border.*, javax.swing.event.*, javax.swing.plaf.basic.BasicRadioButtonUI, javax.swing.table.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private Action
pack-priv JButton
private static final int
private static final int
private Action
pack-priv JButton
private Color
private Color
pack-priv JConsole
pack-priv JLabel
pack-priv JRadioButton
pack-priv JScrollPane
private Icon
pack-priv JTextField
pack-priv JPanel
pack-priv JLabel
pack-priv JRadioButton
pack-priv JTextField
private static JLabel
pack-priv JTextField
pack-priv ConnectDialog.ManagedVmTableModel
pack-priv JTable
Inherited from sun.tools.jconsole.InternalDialog:
statusBar

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
changedUpdate(DocumentEvent e)

Implements javax.swing.event.DocumentListener.changedUpdate.

Gives notification that an attribute or set of attributes changed.

private void
public void
focusGained(FocusEvent e)

Implements java.awt.event.FocusListener.focusGained.

Invoked when a component gains the keyboard focus.

public void
focusLost(FocusEvent e)

Implements java.awt.event.FocusListener.focusLost.

Invoked when a component loses the keyboard focus.

public static int
public void
insertUpdate(DocumentEvent e)

Implements javax.swing.event.DocumentListener.insertUpdate.

Gives notification that there was an insert into the document.

public void
itemStateChanged(ItemEvent ev)

Implements java.awt.event.ItemListener.itemStateChanged.

Invoked when an item has been selected or deselected by the user.

public void
keyPressed(KeyEvent e)

Implements java.awt.event.KeyListener.keyPressed.

Invoked when a key has been pressed.

public void
keyReleased(KeyEvent e)

Implements java.awt.event.KeyListener.keyReleased.

Invoked when a key has been released.

public void
keyTyped(KeyEvent e)

Implements java.awt.event.KeyListener.keyTyped.

Invoked when a key has been typed.

public void
public void
removeUpdate(DocumentEvent e)

Implements javax.swing.event.DocumentListener.removeUpdate.

Gives notification that a portion of the document has been removed.

public void
revalidate()

Overrides javax.swing.JComponent.revalidate.

Supports deferred automatic layout.

public void
setConnectionParameters(String url, String host, int port, String userName, String password, String msg)

public void
setVisible(boolean b)

Overrides javax.swing.JComponent.setVisible.

Makes the component visible or invisible.

private void
public void
valueChanged(ListSelectionEvent e)

Implements javax.swing.event.ListSelectionListener.valueChanged.

Called whenever the value of the selection changes.

Inherited from sun.tools.jconsole.InternalDialog:
setLocationRelativeTo

Field Detail

cancelActionback to summary
private Action cancelAction
cancelButtonback to summary
pack-priv JButton cancelButton
COL_NAMEback to summary
private static final int COL_NAME
COL_PIDback to summary
private static final int COL_PID
connectActionback to summary
private Action connectAction
connectButtonback to summary
pack-priv JButton connectButton
disabledTableCellColorback to summary
private Color disabledTableCellColor
hintTextColorback to summary
private Color hintTextColor
jConsoleback to summary
pack-priv JConsole jConsole
localMessageLabelback to summary
pack-priv JLabel localMessageLabel
localRadioButtonback to summary
pack-priv JRadioButton localRadioButton
localTableScrollPaneback to summary
pack-priv JScrollPane localTableScrollPane
mastheadIconback to summary
private Icon mastheadIcon
passwordTFback to summary
pack-priv JTextField passwordTF
radioButtonPanelback to summary
pack-priv JPanel radioButtonPanel
remoteMessageLabelback to summary
pack-priv JLabel remoteMessageLabel
remoteRadioButtonback to summary
pack-priv JRadioButton remoteRadioButton
remoteTFback to summary
pack-priv JTextField remoteTF
tmpLabelback to summary
private static JLabel tmpLabel
userNameTFback to summary
pack-priv JTextField userNameTF
vmModelback to summary
pack-priv ConnectDialog.ManagedVmTableModel vmModel
vmTableback to summary
pack-priv JTable vmTable

Constructor Detail

ConnectDialogback to summary
public ConnectDialog(JConsole jConsole)

Method Detail

changedUpdateback to summary
public void changedUpdate(DocumentEvent e)

Implements javax.swing.event.DocumentListener.changedUpdate.

Doc from javax.swing.event.DocumentListener.changedUpdate.

Gives notification that an attribute or set of attributes changed.

createActionsback to summary
private void createActions()
focusGainedback to summary
public void focusGained(FocusEvent e)

Implements java.awt.event.FocusListener.focusGained.

Doc from java.awt.event.FocusListener.focusGained.

Invoked when a component gains the keyboard focus.

focusLostback to summary
public void focusLost(FocusEvent e)

Implements java.awt.event.FocusListener.focusLost.

Doc from java.awt.event.FocusListener.focusLost.

Invoked when a component loses the keyboard focus.

getLabelWidthback to summary
public static int getLabelWidth(String text)
insertUpdateback to summary
public void insertUpdate(DocumentEvent e)

Implements javax.swing.event.DocumentListener.insertUpdate.

Doc from javax.swing.event.DocumentListener.insertUpdate.

Gives notification that there was an insert into the document. The range given by the DocumentEvent bounds the freshly inserted region.

itemStateChangedback to summary
public void itemStateChanged(ItemEvent ev)

Implements java.awt.event.ItemListener.itemStateChanged.

Doc from java.awt.event.ItemListener.itemStateChanged.

Invoked when an item has been selected or deselected by the user. The code written for this method performs the operations that need to occur when an item is selected (or deselected).

keyPressedback to summary
public void keyPressed(KeyEvent e)

Implements java.awt.event.KeyListener.keyPressed.

Doc from java.awt.event.KeyListener.keyPressed.

Invoked when a key has been pressed. See the class description for KeyEvent for a definition of a key pressed event.

keyReleasedback to summary
public void keyReleased(KeyEvent e)

Implements java.awt.event.KeyListener.keyReleased.

Doc from java.awt.event.KeyListener.keyReleased.

Invoked when a key has been released. See the class description for KeyEvent for a definition of a key released event.

keyTypedback to summary
public void keyTyped(KeyEvent e)

Implements java.awt.event.KeyListener.keyTyped.

Doc from java.awt.event.KeyListener.keyTyped.

Invoked when a key has been typed. See the class description for KeyEvent for a definition of a key typed event.

refreshback to summary
public void refresh()
removeUpdateback to summary
public void removeUpdate(DocumentEvent e)

Implements javax.swing.event.DocumentListener.removeUpdate.

Doc from javax.swing.event.DocumentListener.removeUpdate.

Gives notification that a portion of the document has been removed. The range is given in terms of what the view last saw (that is, before updating sticky positions).

revalidateback to summary
public void revalidate()

Overrides javax.swing.JComponent.revalidate.

Doc from javax.swing.JComponent.revalidate.

Supports deferred automatic layout.

Calls invalidate and then adds this component's validateRoot to a list of components that need to be validated. Validation will occur after all currently pending events have been dispatched. In other words after this method is called, the first validateRoot (if any) found when walking up the containment hierarchy of this component will be validated. By default, JRootPane, JScrollPane, and JTextField return true from isValidateRoot.

This method will automatically be called on this component when a property value changes such that size, location, or internal layout of this component has been affected. This automatic updating differs from the AWT because programs generally no longer need to invoke validate to get the contents of the GUI to update.

setConnectionParametersback to summary
public void setConnectionParameters(String url, String host, int port, String userName, String password, String msg)
setVisibleback to summary
public void setVisible(boolean b)

Overrides javax.swing.JComponent.setVisible.

Doc from javax.swing.JComponent.setVisible.

Makes the component visible or invisible. Overrides Component.setVisible.

updateButtonStatesback to summary
private void updateButtonStates()
valueChangedback to summary
public void valueChanged(ListSelectionEvent e)

Implements javax.swing.event.ListSelectionListener.valueChanged.

Doc from javax.swing.event.ListSelectionListener.valueChanged.

Called whenever the value of the selection changes.

sun.tools.jconsole back to summary

private Class ConnectDialog.LocalTabJTable

extends JTable
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv Border
pack-priv ConnectDialog.ManagedVmTableModel
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 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 String
getToolTipText(MouseEvent e)

Overrides javax.swing.JTable.getToolTipText.

Overrides JComponent's getToolTipText method in order to allow the renderer's tips to be used if it has text set.

Inherited from javax.swing.JTable:
addColumnaddColumnSelectionIntervaladdNotifyaddRowSelectionIntervalchangeSelectionclearSelectioncolumnAddedcolumnAtPointcolumnMarginChangedcolumnMovedcolumnRemovedcolumnSelectionChangedconfigureEnclosingScrollPaneconvertColumnIndexToModelconvertColumnIndexToViewconvertRowIndexToModelconvertRowIndexToViewcreateDefaultColumnModelcreateDefaultColumnsFromModelcreateDefaultDataModelcreateDefaultEditorscreateDefaultRendererscreateDefaultSelectionModelcreateDefaultTableHeadercreateScrollPaneForTabledoLayouteditCellAteditCellAteditingCancelededitingStoppedgetAccessibleContextgetAutoCreateColumnsFromModelgetAutoCreateRowSortergetAutoResizeModegetCellEditorgetCellEditorgetCellRectgetCellSelectionEnabledgetColumngetColumnClassgetColumnCountgetColumnModelgetColumnNamegetColumnSelectionAllowedgetDefaultEditorgetDefaultRenderergetDragEnabledgetDropLocationgetDropModegetEditingColumngetEditingRowgetEditorComponentgetFillsViewportHeightgetGridColorgetIntercellSpacinggetModelgetPreferredScrollableViewportSizegetPrintablegetRowCountgetRowHeightgetRowHeightgetRowMargingetRowSelectionAllowedgetRowSortergetScrollableBlockIncrementgetScrollableTracksViewportHeightgetScrollableTracksViewportWidthgetScrollableUnitIncrementgetSelectedColumngetSelectedColumnCountgetSelectedColumnsgetSelectedRowgetSelectedRowCountgetSelectedRowsgetSelectionBackgroundgetSelectionForegroundgetSelectionModelgetShowHorizontalLinesgetShowVerticalLinesgetSurrendersFocusOnKeystrokegetTableHeadergetUIgetUIClassIDgetUpdateSelectionOnSortgetValueAtinitializeLocalVarsisCellEditableisCellSelectedisColumnSelectedisEditingisRowSelectedmoveColumnparamStringprepareEditorprepareRendererprintprintprintprintprintprocessKeyBindingremoveColumnremoveColumnSelectionIntervalremoveEditorremoveNotifyremoveRowSelectionIntervalresizeAndRepaintrowAtPointselectAllsetAutoCreateColumnsFromModelsetAutoCreateRowSortersetAutoResizeModesetCellEditorsetCellSelectionEnabledsetColumnModelsetColumnSelectionAllowedsetColumnSelectionIntervalsetDefaultEditorsetDefaultRenderersetDragEnabledsetDropModesetEditingColumnsetEditingRowsetFillsViewportHeightsetGridColorsetIntercellSpacingsetModelsetPreferredScrollableViewportSizesetRowHeightsetRowHeightsetRowMarginsetRowSelectionAllowedsetRowSelectionIntervalsetRowSortersetSelectionBackgroundsetSelectionForegroundsetSelectionModesetSelectionModelsetShowGridsetShowHorizontalLinessetShowVerticalLinessetSurrendersFocusOnKeystrokesetTableHeadersetUIsetUpdateSelectionOnSortsetValueAtsizeColumnsToFitsizeColumnsToFitsorterChangedtableChangedunconfigureEnclosingScrollPaneupdateUIvalueChanged

Field Detail

rendererBorderback to summary
pack-priv Border rendererBorder
vmModelback to summary
pack-priv ConnectDialog.ManagedVmTableModel vmModel

Constructor Detail

LocalTabJTableback to summary
public LocalTabJTable(ConnectDialog.ManagedVmTableModel model)

Method Detail

getCellRendererback to summary
public 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.

getToolTipTextback to summary
public String getToolTipText(MouseEvent e)

Overrides javax.swing.JTable.getToolTipText.

Doc from javax.swing.JTable.getToolTipText.

Overrides JComponent's getToolTipText method in order to allow the renderer's tips to be used if it has text set.

Note

For JTable to properly display tooltips of its renderers JTable must be a registered component with the ToolTipManager. This is done automatically in initializeLocalVars, but if at a later point JTable is told setToolTipText(null) it will unregister the table component, and no tips from renderers will display anymore.

sun.tools.jconsole back to summary

private Class ConnectDialog.ManagedVmTableModel

extends AbstractTableModel
Class Inheritance

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Class<?>
getColumnClass(int column)

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 synchronized int
getRowCount()

Implements javax.swing.table.TableModel.getRowCount.

Returns the number of rows in the model.

public synchronized Object
getValueAt(int row, int col)

Implements javax.swing.table.TableModel.getValueAt.

Returns the value for the cell at columnIndex and rowIndex.

public synchronized void
public synchronized LocalVirtualMachine
vmAt(int pos)

Inherited from javax.swing.table.AbstractTableModel:
addTableModelListenerfindColumnfireTableCellUpdatedfireTableChangedfireTableDataChangedfireTableRowsDeletedfireTableRowsInsertedfireTableRowsUpdatedfireTableStructureChangedgetListenersgetTableModelListenersisCellEditableremoveTableModelListenersetValueAt

Field Detail

columnNamesback to summary
private static String[] columnNames
vmListback to summary
private List<LocalVirtualMachine> vmList

Constructor Detail

ManagedVmTableModelback to summary
public ManagedVmTableModel()

Method Detail

getColumnClassback to summary
public Class<?> getColumnClass(int column)

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.

getRowCountback to summary
public synchronized 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 synchronized 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.

refreshback to summary
public synchronized void refresh()
vmAtback to summary
public synchronized LocalVirtualMachine vmAt(int pos)
sun.tools.jconsole back to summary

private Class ConnectDialog.Padder

extends JPanel
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv JRadioButton

Constructor Summary

AccessConstructor and Description
pack-priv
Padder(JRadioButton radioButton)

Method Summary

Modifier and TypeMethod and Description
public Dimension
getPreferredSize()

Overrides javax.swing.JComponent.getPreferredSize.

If the preferredSize has been set to a non-null value just returns it.

private static Rectangle
Inherited from javax.swing.JPanel:
getAccessibleContextgetUIgetUIClassIDparamStringsetUIupdateUI

Field Detail

radioButtonback to summary
pack-priv JRadioButton radioButton

Constructor Detail

Padderback to summary
pack-priv Padder(JRadioButton radioButton)

Method Detail

getPreferredSizeback to summary
public Dimension getPreferredSize()

Overrides javax.swing.JComponent.getPreferredSize.

Doc from javax.swing.JComponent.getPreferredSize.

If the preferredSize has been set to a non-null value just returns it. If the UI delegate's getPreferredSize method returns a non null value then return that; otherwise defer to the component's layout manager.

getTextRectangleback to summary
private static Rectangle getTextRectangle(AbstractButton button)