/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
@SuppressWarnings("serial")
implements DocumentListener, FocusListener,
// The table of managed VM (local process)
setAccessibleDescription(this,
setResizable(false);
remoteTF = new JTextField();
remoteTF.addFocusListener(this);
//
// If the VM supports the local attach mechanism (is: Sun
// implementation) then the Local Process panel is created.
//
if (JConsole.isLocalAttachAvailable()) {
vmModel = new ManagedVmTableModel();
vmTable.setColumnSelectionAllowed(false);
vmTable.addFocusListener(this);
pidColumn.setResizable(false);
cmdLineColumn.setResizable(false);
localRadioButton.addItemListener(this);
}
if (localRadioButton != null) {
new AbstractAction("nextRadioButton") {
rb.requestFocus();
}
};
"nextRadioButton");
"nextRadioButton");
} else {
}
userNameTF.addFocusListener(this);
// Heights differ, so fix here
passwordTF.addFocusListener(this);
} else {
}
Utilities.updateTransparency(this);
}
public void revalidate() {
// Adjust some colors
if (remoteMessageLabel != null) {
// Update html color setting
}
if (localMessageLabel != null) {
// Update html color setting
}
super.revalidate();
}
private void createActions() {
/* init */ {
}
return;
}
setVisible(false);
if (remoteRadioButton.isSelected()) {
try {
return;
} else {
if (index >= 0) {
}
return;
}
}
}
setVisible(true);
// Try to connect to selected VM. If a connection
// cannot be established for some reason (the process has
// terminated for example) then keep the dialog open showing
// the connect error.
//
if (row >= 0) {
}
refresh();
}
}
};
setVisible(false);
}
};
}
// a label used solely for calculating the width
}
super(model);
// Remove vertical lines, expect for GTK L&F.
// (because GTK doesn't show header dividers)
setShowVerticalLines(false);
}
// Double-click handler
addMouseListener(new MouseAdapter() {
}
}
});
// Enter should call default action
}
int rowIndex = rowAtPoint(p);
int colIndex = columnAtPoint(p);
if (realColumnIndex == COL_NAME) {
}
return tip;
}
return new DefaultTableCellRenderer() {
boolean isSelected,
boolean hasFocus,
int row,
int column) {
if (!isSelected) {
}
}
}
}
return comp;
}
};
}
}
int port,
remoteRadioButton.setSelected(true);
} else {
}
pack();
}
}
}
if (!localRadioButton.isSelected()) {
}
}
private void updateButtonStates() {
boolean connectEnabled = false;
if (remoteRadioButton.isSelected()) {
if (row >= 0) {
}
}
}
}
}
}
if (!e.isTemporary() &&
source instanceof JTextField &&
opposite instanceof JComponent &&
}
remoteRadioButton.setSelected(true);
localRadioButton.setSelected(true);
// if there's only one process then select the row
}
}
}
}
char c = e.getKeyChar();
setVisible(false);
c == KeyEvent.VK_BACK_SPACE ||
getToolkit().beep();
e.consume();
}
}
public void setVisible(boolean b) {
boolean wasVisible = isVisible();
super.setVisible(b);
if (b && !wasVisible) {
public void run() {
if (remoteRadioButton.isSelected()) {
}
}
});
}
}
}
}
// ListSelectionListener interface
if (row >= 0) {
if (!lvm.isManageable()) {
if (lvm.isAttachable()) {
} else {
}
}
}
}
// ----
// Refresh the list of managed VMs
public void refresh() {
// Remember selection
if (row >= 0) {
}
int selectRow = -1;
int n = vmModel.getRowCount();
for (int i = 0; i < n; i++) {
selectRow = i;
break;
}
}
}
if (selectRow > -1) {
} else {
}
// Tricky. Reduce height by one to avoid double line at bottom,
// but that causes a scroll bar to appear, so remove it.
}
pack();
}
// Represents the list of managed VMs as a tabular data model.
};
public int getColumnCount() {
return columnNames.length;
}
return columnNames[col];
}
public synchronized int getRowCount() {
}
switch (col) {
default: return null;
}
}
switch (column) {
default: return super.getColumnClass(column);
}
}
public ManagedVmTableModel() {
refresh();
}
}
public synchronized void refresh() {
// data has changed
}
}
// A blank component that takes up as much space as the
// button part of a JRadioButton.
this.radioButton = radioButton;
}
return new Dimension(w, 0);
}
}
return null;
}
if (g == null) {
return null;
}
g.getFontMetrics(),
text,
icon,
button.getIconTextGap());
return paintTextR;
}
}
}