< prev index next >

## src/java.desktop/macosx/classes/sun/lwawt/LWChoicePeer.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.

    *** 155,166 ****
              /**
               * We should post ITEM_STATE_CHANGED event when the same element is
               * reselected.
               */
              @Override
    !         public void setSelectedItem(final Object anObject) {
    !             final Object oldSelection = selectedItemReminder;
                  if (oldSelection != null && oldSelection.equals(anObject)) {
                      selectedItemChanged();
                  }
                  super.setSelectedItem(anObject);
              }
    --- 155,166 ----
              /**
               * We should post ITEM_STATE_CHANGED event when the same element is
               * reselected.
               */
              @Override
    !         public void setSelectedItem(final String anObject) {
    !             final String oldSelection = selectedItemReminder;
                  if (oldSelection != null && oldSelection.equals(anObject)) {
                      selectedItemChanged();
                  }
                  super.setSelectedItem(anObject);
              }

< prev index next >