/*
* 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.
*/
import javax.management.*;
@SuppressWarnings("serial")
};
private volatile boolean subscribed;
"jconsole.xnotification.received";
private volatile boolean enabled;
public XMBeanNotifications() {
setColumnSelectionAllowed(false);
setRowSelectionAllowed(false);
getTableHeader().setReorderingAllowed(false);
}
// Call on EDT
public void cancelCellEditing() {
}
}
// Call on EDT
public void stopCellEditing() {
}
}
// Call on EDT
return cell.isMaximized();
}
return true;
}
// Call on EDT
}
// Call on EDT
//In case we have a repaint thread that is in the process of
//repainting an obsolete table, just ignore the call.
//It can happen when MBean selection is switched at a very quick rate
if (row >= getRowCount()) {
return null;
}
if (normalFont == null) {
}
if (size > 0) {
}
}
} else {
}
return comp;
}
// Call on EDT
//In case we have a repaint thread that is in the process of
//repainting an obsolete table, just ignore the call.
//It can happen when MBean selection is switched at a very quick rate
if (row >= getRowCount()) {
return null;
}
} else {
renderer =
}
} else {
}
}
return renderer;
}
// Call on EDT
if (obj instanceof UserDataCell) {
return (UserDataCell) obj;
}
return null;
}
synchronized void dispose() {
}
return 0;
} else {
return listener.getReceivedNotifications();
}
}
public synchronized boolean clearCurrentNotifications() {
emptyTable();
if (currentListener != null) {
return true;
} else {
return false;
}
}
}
throws InstanceNotFoundException, IOException {
if (!subscribed) {
try {
subscribed = true;
} catch (Exception e) {
e.printStackTrace();
}
}
}
} else {
if (!listener.isRegistered()) {
emptyTable();
}
}
enabled = true;
}
public synchronized void handleNotification(
try {
if (notif instanceof MBeanServerNotification) {
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
public synchronized void disableNotifications() {
emptyTable();
enabled = false;
}
return true;
} else {
return false;
}
}
}
}
// Call on EDT
void fireNotificationReceived(
if (enabled) {
if (listener == currentListener) {
repaint();
}
}
}
}
// Call on EDT
emptyTable();
}
}
return false;
}
return listener.isRegistered();
}
// Call on EDT
emptyTable();
enabled = true;
validate();
repaint();
} else {
enabled = false;
}
}
// Call on EDT
private void setColumnEditors() {
if (i == 2) {
} else {
}
}
}
// Call on EDT
public boolean isTableEditable() {
return true;
}
// Call on EDT
public synchronized void emptyTable() {
//invalidate();
}
validate();
}
// Call on EDT
if (obj instanceof UserDataCell) {
if (rowMinHeight == -1) {
}
}
cell.switchState();
if (!cell.isMaximized()) {
//Back to simple editor.
}
invalidate();
repaint();
}
}
if (d.getHeight() > 200) {
}
}
boolean isSelected,
boolean hasFocus,
int row,
int column) {
return comp;
}
return comp;
}
}
class UserDataCell {
int minHeight;
boolean minimized = true;
boolean init = false;
}
return null;
}
}
if (userData instanceof CompositeData ||
userData instanceof TabularData) {
}
}
boolean isInited() {
return init;
}
this.minRenderer = minRenderer;
init = true;
}
void switchState() {
}
boolean isMaximized() {
return !minimized;
}
void minimize() {
minimized = true;
}
void maximize() {
minimized = false;
}
int getHeight() {
if (minimized) {
return minHeight;
} else {
return (int) maxRenderer.getComponent().
}
}
if (minimized) {
return minRenderer;
} else {
return maxRenderer;
}
}
}
if (e.getClickCount() >= 2) {
if (col != 2) {
return;
}
return;
}
}
}
}
}
// implements javax.swing.table.TableCellEditor
boolean isSelected,
int row,
int column) {
if (column == 2) {
if (obj instanceof UserDataCell) {
return zr.getComponent();
}
} else {
textField.setEditable(false);
return comp;
}
}
return super.getTableCellEditorComponent(
val,
row,
column);
}
public boolean stopCellEditing() {
int editingRow = getEditingRow();
int editingColumn = getEditingColumn();
if (editingColumn == 2) {
if (obj instanceof UserDataCell) {
if (cell.isMaximized()) {
return true;
}
}
}
return super.stopCellEditing();
}
}
private volatile long received;
private volatile boolean unregistered;
public XMBeanNotificationsListener(
String[] columnNames) {
this.notifications = notifications;
}
return data;
}
public synchronized void clear() {
received = 0;
}
public synchronized boolean isRegistered() {
return !unregistered;
}
public synchronized void unregister() {
try {
} catch (Exception e) {
e.printStackTrace();
}
}
unregistered = true;
}
public synchronized long getReceivedNotifications() {
return received;
}
clear();
try {
unregistered = false;
} catch (Exception e) {
e.printStackTrace();
}
}
}
public synchronized void handleNotification(
public void run() {
synchronized (XMBeanNotificationsListener.this) {
try {
if (unregistered) {
return;
}
}
time,
n.getType(),
n.getSequenceNumber(),
n.getMessage(),
n,
n.getSource()
};
received++;
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
});
}
}
}