< prev index next >

## src/jdk.jconsole/share/classes/sun/tools/jconsole/MemoryTab.java

Print this page

    rev 48358 : Work in progress for JDK-6303622
    Use generic in Swing components like JComboBox
    1. Added generic return type and parameter type for JComboBox.
    2. Modified JList related classes as well.

    @@ -224,11 +224,11 @@
         }

         public void itemStateChanged(ItemEvent ev) {
             if (ev.getStateChange() == ItemEvent.SELECTED) {
    -            Plotter plotter = (Plotter)plotterChoice.getSelectedItem();
    +            Plotter plotter = plotterChoice.getSelectedItem();
                 plotterPanel.setPlotter(plotter);
                 plotterPanel.repaint();
             }
         }

    @@ -378,11 +378,11 @@
                 return "";
             }

             String text = "<table cellspacing=0 cellpadding=0>";

    -        Plotter plotter = (Plotter)plotterChoice.getSelectedItem();
    +        Plotter plotter = plotterChoice.getSelectedItem();
             if (plotter == null) {
                 return "";
             }

             //long time = plotter.getLastTimeStamp();

    @@ -640,11 +640,11 @@
                 g.drawString(str, x, y);

                 // Highlight current plotter
                 g.setColor(Color.blue);
                 r = null;
    -            Plotter plotter = (Plotter)plotterChoice.getSelectedItem();
    +            Plotter plotter = plotterChoice.getSelectedItem();
                 if (plotter == heapPlotter) {
                     r = heapRect;
                 } else if (plotter == nonHeapPlotter) {
                     r = nonHeapRect;
                 } else if (plotter instanceof PoolPlotter) {

< prev index next >