< prev index next >

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

Print this page

    rev 48858 : 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.
    3. Reverted the changes made to "getSelectedValues" as suggested by Joe.
    4. Modified files that were failing on Linux and Mac as well.

    *** 224,234 ****
          }

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

    --- 224,234 ----
          }

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

    *** 378,388 ****
                  return "";
              }

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

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

              //long time = plotter.getLastTimeStamp();
    --- 378,388 ----
                  return "";
              }

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

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

              //long time = plotter.getLastTimeStamp();
    *** 640,650 ****
                  g.drawString(str, x, y);

                  // Highlight current plotter
                  g.setColor(Color.blue);
                  r = null;
    !             Plotter plotter = (Plotter)plotterChoice.getSelectedItem();
                  if (plotter == heapPlotter) {
                      r = heapRect;
                  } else if (plotter == nonHeapPlotter) {
                      r = nonHeapRect;
                  } else if (plotter instanceof PoolPlotter) {
    --- 640,650 ----
                  g.drawString(str, x, y);

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

< prev index next >