提交 5e97f479 编写于 作者: M michaelm

Merge

...@@ -9,3 +9,4 @@ b7474b739d13bacd9972f88ac91f6350b7b0be12 jdk7-b31 ...@@ -9,3 +9,4 @@ b7474b739d13bacd9972f88ac91f6350b7b0be12 jdk7-b31
c51121419e30eac5f0fbbce45ff1711c4ce0de28 jdk7-b32 c51121419e30eac5f0fbbce45ff1711c4ce0de28 jdk7-b32
fa4c0a6cdd25d97d4e6f5d7aa180bcbb0e0d56af jdk7-b33 fa4c0a6cdd25d97d4e6f5d7aa180bcbb0e0d56af jdk7-b33
434055a0716ee44bca712ebca02fc04b20e6e288 jdk7-b34 434055a0716ee44bca712ebca02fc04b20e6e288 jdk7-b34
cf4894b78ceb966326e93bf221db0c2d14d59218 jdk7-b35
...@@ -23,10 +23,6 @@ ...@@ -23,10 +23,6 @@
# have any questions. # have any questions.
# #
#
# Makefile for building com/sun
#
BUILDDIR = ../../.. BUILDDIR = ../../..
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
......
...@@ -23,10 +23,6 @@ ...@@ -23,10 +23,6 @@
# have any questions. # have any questions.
# #
#
# Makefile for building com/sun
#
BUILDDIR = ../../../.. BUILDDIR = ../../../..
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
# #
# #
# Makefile for building JNDI service provider toolkit # Makefile for building JNDI DNS name service provider
# #
BUILDDIR = ../../../../.. BUILDDIR = ../../../../..
......
/* /*
* Copyright 1996-1997 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,6 +34,7 @@ package java.net; ...@@ -34,6 +34,7 @@ package java.net;
*/ */
public class BindException extends SocketException { public class BindException extends SocketException {
private static final long serialVersionUID = -5945005768251722951L;
/** /**
* Constructs a new BindException with the specified detail * Constructs a new BindException with the specified detail
......
/* /*
* Copyright 1996-1997 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,6 +34,8 @@ package java.net; ...@@ -34,6 +34,8 @@ package java.net;
* @since JDK1.1 * @since JDK1.1
*/ */
public class ConnectException extends SocketException { public class ConnectException extends SocketException {
private static final long serialVersionUID = 3831404271622369215L;
/** /**
* Constructs a new ConnectException with the specified detail * Constructs a new ConnectException with the specified detail
* message as to why the connect error occurred. * message as to why the connect error occurred.
......
/* /*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -37,6 +37,7 @@ import java.io.IOException; ...@@ -37,6 +37,7 @@ import java.io.IOException;
*/ */
public public
class HttpRetryException extends IOException { class HttpRetryException extends IOException {
private static final long serialVersionUID = -9186022286469111381L;
private int responseCode; private int responseCode;
private String location; private String location;
......
/* /*
* Copyright 1995-1997 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -36,6 +36,8 @@ import java.io.IOException; ...@@ -36,6 +36,8 @@ import java.io.IOException;
* @since JDK1.0 * @since JDK1.0
*/ */
public class MalformedURLException extends IOException { public class MalformedURLException extends IOException {
private static final long serialVersionUID = -182787522200415866L;
/** /**
* Constructs a <code>MalformedURLException</code> with no detail message. * Constructs a <code>MalformedURLException</code> with no detail message.
*/ */
......
/* /*
* Copyright 1996-1997 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,6 +34,8 @@ package java.net; ...@@ -34,6 +34,8 @@ package java.net;
* @since JDK1.1 * @since JDK1.1
*/ */
public class NoRouteToHostException extends SocketException { public class NoRouteToHostException extends SocketException {
private static final long serialVersionUID = -1897550894873493790L;
/** /**
* Constructs a new NoRouteToHostException with the specified detail * Constructs a new NoRouteToHostException with the specified detail
* message as to why the remote host cannot be reached. * message as to why the remote host cannot be reached.
......
/* /*
* Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -33,6 +33,7 @@ package java.net; ...@@ -33,6 +33,7 @@ package java.net;
*/ */
public class PortUnreachableException extends SocketException { public class PortUnreachableException extends SocketException {
private static final long serialVersionUID = 8462541992376507323L;
/** /**
* Constructs a new <code>PortUnreachableException</code> with a * Constructs a new <code>PortUnreachableException</code> with a
......
/* /*
* Copyright 1995-1997 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -36,6 +36,8 @@ import java.io.IOException; ...@@ -36,6 +36,8 @@ import java.io.IOException;
*/ */
public public
class ProtocolException extends IOException { class ProtocolException extends IOException {
private static final long serialVersionUID = -6098449442062388080L;
/** /**
* Constructs a new <code>ProtocolException</code> with the * Constructs a new <code>ProtocolException</code> with the
* specified detail message. * specified detail message.
......
/* /*
* Copyright 1995-2006 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -35,6 +35,8 @@ import java.io.IOException; ...@@ -35,6 +35,8 @@ import java.io.IOException;
*/ */
public public
class SocketException extends IOException { class SocketException extends IOException {
private static final long serialVersionUID = -5935874303556886934L;
/** /**
* Constructs a new <code>SocketException</code> with the * Constructs a new <code>SocketException</code> with the
* specified detail message. * specified detail message.
......
/* /*
* Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.net; ...@@ -32,6 +32,7 @@ package java.net;
*/ */
public class SocketTimeoutException extends java.io.InterruptedIOException { public class SocketTimeoutException extends java.io.InterruptedIOException {
private static final long serialVersionUID = -8846654841826352300L;
/** /**
* Constructs a new SocketTimeoutException with a detail * Constructs a new SocketTimeoutException with a detail
......
/* /*
* Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -38,6 +38,8 @@ package java.net; ...@@ -38,6 +38,8 @@ package java.net;
public class URISyntaxException public class URISyntaxException
extends Exception extends Exception
{ {
private static final long serialVersionUID = 2137979680897488891L;
private String input; private String input;
private int index; private int index;
......
/* /*
* Copyright 1995-1997 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -35,6 +35,8 @@ import java.io.IOException; ...@@ -35,6 +35,8 @@ import java.io.IOException;
*/ */
public public
class UnknownHostException extends IOException { class UnknownHostException extends IOException {
private static final long serialVersionUID = -4639126076052875403L;
/** /**
* Constructs a new <code>UnknownHostException</code> with the * Constructs a new <code>UnknownHostException</code> with the
* specified detail message. * specified detail message.
......
/* /*
* Copyright 1995-1997 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -37,6 +37,8 @@ import java.io.IOException; ...@@ -37,6 +37,8 @@ import java.io.IOException;
* @since JDK1.0 * @since JDK1.0
*/ */
public class UnknownServiceException extends IOException { public class UnknownServiceException extends IOException {
private static final long serialVersionUID = -4169033248853639508L;
/** /**
* Constructs a new <code>UnknownServiceException</code> with no * Constructs a new <code>UnknownServiceException</code> with no
* detail message. * detail message.
......
/* /*
* Copyright 2002 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -30,10 +30,11 @@ import java.net.SocketException; ...@@ -30,10 +30,11 @@ import java.net.SocketException;
/** /**
* Thrown to indicate a connection reset. * Thrown to indicate a connection reset.
* *
* @since 1.4 * @since 1.4.1
*/ */
public public
class ConnectionResetException extends SocketException { class ConnectionResetException extends SocketException {
private static final long serialVersionUID = -7633185991801851556L;
public ConnectionResetException(String msg) { public ConnectionResetException(String msg) {
super(msg); super(msg);
......
...@@ -32,6 +32,7 @@ import java.net.URL; ...@@ -32,6 +32,7 @@ import java.net.URL;
* *
* @author Stanley Man-Kit Ho * @author Stanley Man-Kit Ho
*/ */
@SuppressWarnings("serial") // never serialized
public class ProgressEvent extends EventObject { public class ProgressEvent extends EventObject {
// URL of the stream // URL of the stream
private URL url; private URL url;
......
/* /*
* Copyright 1994-1995 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1994-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -35,6 +35,8 @@ import java.io.*; ...@@ -35,6 +35,8 @@ import java.io.*;
*/ */
public class TelnetProtocolException extends IOException { public class TelnetProtocolException extends IOException {
private static final long serialVersionUID = 8509127047257111343L;
public TelnetProtocolException(String s) { public TelnetProtocolException(String s) {
super(s); super(s);
} }
......
/* /*
* Copyright 1994-1995 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1994-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,6 +34,8 @@ import java.io.*; ...@@ -34,6 +34,8 @@ import java.io.*;
* @author Jonathan Payne * @author Jonathan Payne
*/ */
public class FtpLoginException extends FtpProtocolException { public class FtpLoginException extends FtpProtocolException {
private static final long serialVersionUID = 2218162403237941536L;
FtpLoginException(String s) { FtpLoginException(String s) {
super(s); super(s);
} }
......
/* /*
* Copyright 1994-1995 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1994-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,6 +34,8 @@ import java.io.*; ...@@ -34,6 +34,8 @@ import java.io.*;
* @author Jonathan Payne * @author Jonathan Payne
*/ */
public class FtpProtocolException extends IOException { public class FtpProtocolException extends IOException {
private static final long serialVersionUID = 5978077070276545054L;
FtpProtocolException(String s) { FtpProtocolException(String s) {
super(s); super(s);
} }
......
/* /*
* Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,6 +29,8 @@ package sun.net.httpserver; ...@@ -29,6 +29,8 @@ package sun.net.httpserver;
* A Http error * A Http error
*/ */
class HttpError extends RuntimeException { class HttpError extends RuntimeException {
private static final long serialVersionUID = 8769596371344178179L;
public HttpError (String msg) { public HttpError (String msg) {
super (msg); super (msg);
} }
......
/* /*
* Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,4 +28,5 @@ package sun.net.httpserver; ...@@ -28,4 +28,5 @@ package sun.net.httpserver;
import java.io.*; import java.io.*;
class StreamClosedException extends IOException { class StreamClosedException extends IOException {
private static final long serialVersionUID = -4485921499356327937L;
} }
/* /*
* Copyright 1995 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,8 @@ import java.io.IOException; ...@@ -32,6 +32,8 @@ import java.io.IOException;
* an SMTP session. * an SMTP session.
*/ */
public class SmtpProtocolException extends IOException { public class SmtpProtocolException extends IOException {
private static final long serialVersionUID = -7547136771133814908L;
SmtpProtocolException(String s) { SmtpProtocolException(String s) {
super(s); super(s);
} }
......
/* /*
* Copyright 1996 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -33,6 +33,8 @@ package sun.net.www; ...@@ -33,6 +33,8 @@ package sun.net.www;
*/ */
public class ApplicationLaunchException extends Exception { public class ApplicationLaunchException extends Exception {
private static final long serialVersionUID = -4782286141289536883L;
public ApplicationLaunchException(String reason) { public ApplicationLaunchException(String reason) {
super(reason); super(reason);
} }
......
...@@ -43,6 +43,7 @@ import java.security.PrivilegedAction; ...@@ -43,6 +43,7 @@ import java.security.PrivilegedAction;
* @author Chris Hegarty * @author Chris Hegarty
*/ */
@SuppressWarnings("serial") // never serialized
public class KeepAliveStreamCleaner extends LinkedBlockingQueue<KeepAliveCleanerEntry> implements Runnable public class KeepAliveStreamCleaner extends LinkedBlockingQueue<KeepAliveCleanerEntry> implements Runnable
{ {
// maximum amount of remaining data that we will try to cleanup // maximum amount of remaining data that we will try to cleanup
......
...@@ -59,6 +59,8 @@ class DigestAuthentication extends AuthenticationInfo { ...@@ -59,6 +59,8 @@ class DigestAuthentication extends AuthenticationInfo {
// instances as a result of a single authorization (for multiple domains) // instances as a result of a single authorization (for multiple domains)
static class Parameters implements java.io.Serializable { static class Parameters implements java.io.Serializable {
private static final long serialVersionUID = -3584543755194526252L;
private boolean serverQop; // server proposed qop=auth private boolean serverQop; // server proposed qop=auth
private String opaque; private String opaque;
private String cnonce; private String cnonce;
......
...@@ -30,18 +30,15 @@ import java.awt.event.*; ...@@ -30,18 +30,15 @@ import java.awt.event.*;
import java.beans.*; import java.beans.*;
import java.io.*; import java.io.*;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.text.*;
import java.util.*; import java.util.*;
import javax.accessibility.*; import javax.accessibility.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.*; import javax.swing.border.*;
import javax.swing.event.*;
import javax.swing.filechooser.*; import javax.swing.filechooser.*;
import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileFilter;
import com.sun.tools.jconsole.JConsoleContext; import com.sun.tools.jconsole.JConsoleContext;
import com.sun.tools.jconsole.JConsoleContext.ConnectionState;
import static com.sun.tools.jconsole.JConsoleContext.ConnectionState.*; import static com.sun.tools.jconsole.JConsoleContext.ConnectionState.*;
...@@ -130,6 +127,7 @@ public class Plotter extends JComponent ...@@ -130,6 +127,7 @@ public class Plotter extends JComponent
private int bottomMargin = 45; private int bottomMargin = 45;
private int leftMargin = 65; private int leftMargin = 65;
private int rightMargin = 70; private int rightMargin = 70;
private final boolean displayLegend;
public Plotter() { public Plotter() {
this(Unit.NONE, 0); this(Unit.NONE, 0);
...@@ -139,15 +137,21 @@ public class Plotter extends JComponent ...@@ -139,15 +137,21 @@ public class Plotter extends JComponent
this(unit, 0); this(unit, 0);
} }
public Plotter(Unit unit, int decimals) {
this(unit,decimals,true);
}
// Note: If decimals > 0 then values must be decimally shifted left // Note: If decimals > 0 then values must be decimally shifted left
// that many places, i.e. multiplied by Math.pow(10.0, decimals). // that many places, i.e. multiplied by Math.pow(10.0, decimals).
public Plotter(Unit unit, int decimals) { public Plotter(Unit unit, int decimals, boolean displayLegend) {
this.displayLegend = displayLegend;
setUnit(unit); setUnit(unit);
setDecimals(decimals); setDecimals(decimals);
enableEvents(AWTEvent.MOUSE_EVENT_MASK); enableEvents(AWTEvent.MOUSE_EVENT_MASK);
addMouseListener(new MouseAdapter() { addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (getParent() instanceof PlotterPanel) { if (getParent() instanceof PlotterPanel) {
getParent().requestFocusInWindow(); getParent().requestFocusInWindow();
...@@ -240,6 +244,7 @@ public class Plotter extends JComponent ...@@ -240,6 +244,7 @@ public class Plotter extends JComponent
} }
} }
@Override
public JPopupMenu getComponentPopupMenu() { public JPopupMenu getComponentPopupMenu() {
if (popupMenu == null) { if (popupMenu == null) {
popupMenu = new JPopupMenu(Resources.getText("Chart:")); popupMenu = new JPopupMenu(Resources.getText("Chart:"));
...@@ -330,6 +335,7 @@ public class Plotter extends JComponent ...@@ -330,6 +335,7 @@ public class Plotter extends JComponent
} }
} }
@Override
public void paintComponent(Graphics g) { public void paintComponent(Graphics g) {
super.paintComponent(g); super.paintComponent(g);
...@@ -670,7 +676,7 @@ public class Plotter extends JComponent ...@@ -670,7 +676,7 @@ public class Plotter extends JComponent
curValue += "%"; curValue += "%";
} }
int valWidth = fm.stringWidth(curValue); int valWidth = fm.stringWidth(curValue);
String legend = seq.name; String legend = (displayLegend?seq.name:"");
int legendWidth = fm.stringWidth(legend); int legendWidth = fm.stringWidth(legend);
if (checkRightMargin(valWidth) || checkRightMargin(legendWidth)) { if (checkRightMargin(valWidth) || checkRightMargin(legendWidth)) {
// Wait for next repaint // Wait for next repaint
...@@ -986,10 +992,12 @@ public class Plotter extends JComponent ...@@ -986,10 +992,12 @@ public class Plotter extends JComponent
} }
private static class SaveDataFileChooser extends JFileChooser { private static class SaveDataFileChooser extends JFileChooser {
private static final long serialVersionUID = -5182890922369369669L;
SaveDataFileChooser() { SaveDataFileChooser() {
setFileFilter(new FileNameExtensionFilter("CSV file", "csv")); setFileFilter(new FileNameExtensionFilter("CSV file", "csv"));
} }
@Override
public void approveSelection() { public void approveSelection() {
File file = getSelectedFile(); File file = getSelectedFile();
if (file != null) { if (file != null) {
...@@ -1034,6 +1042,7 @@ public class Plotter extends JComponent ...@@ -1034,6 +1042,7 @@ public class Plotter extends JComponent
} }
} }
@Override
public AccessibleContext getAccessibleContext() { public AccessibleContext getAccessibleContext() {
if (accessibleContext == null) { if (accessibleContext == null) {
accessibleContext = new AccessiblePlotter(); accessibleContext = new AccessiblePlotter();
...@@ -1042,10 +1051,12 @@ public class Plotter extends JComponent ...@@ -1042,10 +1051,12 @@ public class Plotter extends JComponent
} }
protected class AccessiblePlotter extends AccessibleJComponent { protected class AccessiblePlotter extends AccessibleJComponent {
private static final long serialVersionUID = -3847205410473510922L;
protected AccessiblePlotter() { protected AccessiblePlotter() {
setAccessibleName(getText("Plotter.accessibleName")); setAccessibleName(getText("Plotter.accessibleName"));
} }
@Override
public String getAccessibleName() { public String getAccessibleName() {
String name = super.getAccessibleName(); String name = super.getAccessibleName();
...@@ -1076,6 +1087,7 @@ public class Plotter extends JComponent ...@@ -1076,6 +1087,7 @@ public class Plotter extends JComponent
return name; return name;
} }
@Override
public AccessibleRole getAccessibleRole() { public AccessibleRole getAccessibleRole() {
return AccessibleRole.CANVAS; return AccessibleRole.CANVAS;
} }
......
...@@ -872,8 +872,8 @@ public class XMBeanAttributes extends XTable { ...@@ -872,8 +872,8 @@ public class XMBeanAttributes extends XTable {
MaximizedCellRenderer(Component comp) { MaximizedCellRenderer(Component comp) {
this.comp = comp; this.comp = comp;
Dimension d = comp.getPreferredSize(); Dimension d = comp.getPreferredSize();
if (d.getHeight() > 200) { if (d.getHeight() > 220) {
comp.setPreferredSize(new Dimension((int) d.getWidth(), 200)); comp.setPreferredSize(new Dimension((int) d.getWidth(), 220));
} }
} }
@Override @Override
......
...@@ -34,7 +34,7 @@ public class XPlotter extends Plotter { ...@@ -34,7 +34,7 @@ public class XPlotter extends Plotter {
JTable table; JTable table;
public XPlotter(JTable table, public XPlotter(JTable table,
Plotter.Unit unit) { Plotter.Unit unit) {
super(unit); super(unit,0,false);
this.table = table; this.table = table;
} }
@Override @Override
......
...@@ -27,14 +27,10 @@ package sun.tools.jconsole.inspector; ...@@ -27,14 +27,10 @@ package sun.tools.jconsole.inspector;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import java.io.*;
import java.util.*; import java.util.*;
import java.util.Timer; import java.util.Timer;
import javax.management.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import sun.tools.jconsole.*; import sun.tools.jconsole.*;
...@@ -127,6 +123,7 @@ public class XPlottingViewer extends PlotterPanel implements ActionListener { ...@@ -127,6 +123,7 @@ public class XPlottingViewer extends PlotterPanel implements ActionListener {
setBackground(g.getColor()); setBackground(g.getColor());
plotter.paintComponent(g); plotter.paintComponent(g);
}*/ }*/
@Override
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
plotterCache.remove(key); plotterCache.remove(key);
Timer t = timerCache.remove(key); Timer t = timerCache.remove(key);
...@@ -141,9 +138,11 @@ public class XPlottingViewer extends PlotterPanel implements ActionListener { ...@@ -141,9 +138,11 @@ public class XPlottingViewer extends PlotterPanel implements ActionListener {
JTable table) { JTable table) {
final Plotter plotter = new XPlotter(table, Plotter.Unit.NONE) { final Plotter plotter = new XPlotter(table, Plotter.Unit.NONE) {
Dimension prefSize = new Dimension(400, 170); Dimension prefSize = new Dimension(400, 170);
@Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
return prefSize; return prefSize;
} }
@Override
public Dimension getMinimumSize() { public Dimension getMinimumSize() {
return prefSize; return prefSize;
} }
...@@ -183,42 +182,40 @@ public class XPlottingViewer extends PlotterPanel implements ActionListener { ...@@ -183,42 +182,40 @@ public class XPlottingViewer extends PlotterPanel implements ActionListener {
return plotter; return plotter;
} }
//Create Plotter display
private void setupDisplay(Plotter plotter) { private void setupDisplay(Plotter plotter) {
//setLayout(new GridLayout(2,0)); final JPanel buttonPanel = new JPanel();
GridBagLayout gbl = new GridBagLayout(); final GridBagLayout gbl = new GridBagLayout();
setLayout(gbl); buttonPanel.setLayout(gbl);
setLayout(new BorderLayout());
plotButton = new JButton(Resources.getText("Discard chart")); plotButton = new JButton(Resources.getText("Discard chart"));
plotButton.addActionListener(this); plotButton.addActionListener(this);
plotButton.setEnabled(true); plotButton.setEnabled(true);
// Add the display to the top four cells
GridBagConstraints buttonConstraints = new GridBagConstraints(); GridBagConstraints buttonConstraints = new GridBagConstraints();
buttonConstraints.gridx = 0; buttonConstraints.gridx = 0;
buttonConstraints.gridy = 0; buttonConstraints.gridy = 0;
buttonConstraints.fill = GridBagConstraints.VERTICAL; buttonConstraints.fill = GridBagConstraints.VERTICAL;
buttonConstraints.anchor = GridBagConstraints.CENTER; buttonConstraints.anchor = GridBagConstraints.CENTER;
gbl.setConstraints(plotButton, buttonConstraints); gbl.setConstraints(plotButton, buttonConstraints);
add(plotButton); buttonPanel.add(plotButton);
GridBagConstraints plotterConstraints = new GridBagConstraints(); if (attributeName != null && attributeName.length()!=0) {
plotterConstraints.gridx = 0; final JPanel plotterLabelPanel = new JPanel();
plotterConstraints.gridy = 1; final JLabel label = new JLabel(attributeName);
plotterConstraints.weightx = 1; final GridBagLayout gbl2 = new GridBagLayout();
//plotterConstraints.gridwidth = (int) plotter.getPreferredSize().getWidth(); plotterLabelPanel.setLayout(gbl2);
//plotterConstraints.gridheight = (int) plotter.getPreferredSize().getHeight(); final GridBagConstraints labelConstraints = new GridBagConstraints();
plotterConstraints.fill = GridBagConstraints.VERTICAL; labelConstraints.gridx = 0;
gbl.setConstraints(plotter, plotterConstraints); labelConstraints.gridy = 0;
labelConstraints.fill = GridBagConstraints.VERTICAL;
labelConstraints.anchor = GridBagConstraints.CENTER;
//bordered = new JPanel(); labelConstraints.ipady = 10;
//bordered.setPreferredSize(new Dimension(400, 250)); gbl2.setConstraints(label, labelConstraints);
//bordered.add(plotButton); plotterLabelPanel.add(label);
//bordered.add(plotter); add(plotterLabelPanel, BorderLayout.NORTH);
}
//add(bordered);
setPlotter(plotter); setPlotter(plotter);
add(buttonPanel, BorderLayout.SOUTH);
repaint(); repaint();
} }
......
...@@ -64,6 +64,7 @@ import java.net.*; ...@@ -64,6 +64,7 @@ import java.net.*;
*/ */
class NTLMAuthentication extends AuthenticationInfo { class NTLMAuthentication extends AuthenticationInfo {
private static final long serialVersionUID = -2403849171106437142L;
static char NTLM_AUTH = 'N'; static char NTLM_AUTH = 'N';
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/** /**
* @test * @test
* @bug B6744329 * @bug 6744329
* @summary Exception in light weight Http server * @summary Exception in light weight Http server
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册