src/share/classes/sun/tools/jconsole/inspector/XPlottingViewer.java
Print this page
rev 5340 : 7017818: NLS: JConsoleResources.java cannot be handled by translation team
Reviewed-by: duke
@@ -31,10 +31,11 @@
import java.util.Timer;
import javax.swing.*;
import sun.tools.jconsole.*;
+import sun.tools.jconsole.resources.Messages;
@SuppressWarnings("serial")
public class XPlottingViewer extends PlotterPanel implements ActionListener {
// TODO: Make number of decimal places customizable
private static final int PLOTTER_DECIMALS = 4;
@@ -43,14 +44,11 @@
// The plotter cache holds Plotter instances for the various attributes
private static HashMap<String, XPlottingViewer> plotterCache =
new HashMap<String, XPlottingViewer>();
private static HashMap<String, Timer> timerCache =
new HashMap<String, Timer>();
- private JPanel bordered;
- private Number value;
private MBeansTab tab;
- private XMBean mbean;
private String attributeName;
private String key;
private JTable table;
private XPlottingViewer(String key,
XMBean mbean,
@@ -60,21 +58,20 @@
MBeansTab tab) {
super(null);
this.tab = tab;
this.key = key;
- this.mbean = mbean;
this.table = table;
this.attributeName = attributeName;
Plotter plotter = createPlotter(mbean, attributeName, key, table);
setupDisplay(plotter);
}
static void dispose(MBeansTab tab) {
- Iterator it = plotterCache.keySet().iterator();
+ Iterator<String> it = plotterCache.keySet().iterator();
while(it.hasNext()) {
- String key = (String) it.next();
+ String key = it.next();
if(key.startsWith(String.valueOf(tab.hashCode()))) {
it.remove();
}
}
//plotterCache.clear();
@@ -185,11 +182,11 @@
private void setupDisplay(Plotter plotter) {
final JPanel buttonPanel = new JPanel();
final GridBagLayout gbl = new GridBagLayout();
buttonPanel.setLayout(gbl);
setLayout(new BorderLayout());
- plotButton = new JButton(Resources.getText("Discard chart"));
+ plotButton = new JButton(Messages.DISCARD_CHART);
plotButton.addActionListener(this);
plotButton.setEnabled(true);
GridBagConstraints buttonConstraints = new GridBagConstraints();
buttonConstraints.gridx = 0;