< prev index next >

src/com/sun/javatest/tool/DesktopPrefsPane.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg

*** 31,50 **** import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Enumeration; import java.util.Map; import javax.swing.plaf.basic.BasicComboBoxRenderer; - import javax.swing.Box; - import javax.swing.ButtonGroup; - import javax.swing.ButtonModel; - import javax.swing.JCheckBox; - import javax.swing.JComboBox; - import javax.swing.JLabel; - import javax.swing.JList; - import javax.swing.JPanel; - import javax.swing.JRadioButton; /** * Preferences for the desktop itself. */ class DesktopPrefsPane extends PreferencesPane { --- 31,42 ---- import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Enumeration; import java.util.Map; + import javax.swing.*; import javax.swing.plaf.basic.BasicComboBoxRenderer; /** * Preferences for the desktop itself. */ class DesktopPrefsPane extends PreferencesPane {
*** 78,88 **** public void load(Map<String, String> m) { String styleName = m.get(Desktop.STYLE_PREF); if (styleName == null) styleName = Desktop.styleNames[desktop.getStyle()]; ! for (Enumeration e = styleGrp.getElements(); e.hasMoreElements(); ) { JRadioButton rb = (JRadioButton)e.nextElement(); if (rb.getActionCommand().equals(styleName)) { rb.setSelected(true); break; } --- 70,80 ---- public void load(Map<String, String> m) { String styleName = m.get(Desktop.STYLE_PREF); if (styleName == null) styleName = Desktop.styleNames[desktop.getStyle()]; ! for (Enumeration<AbstractButton> e = styleGrp.getElements(); e.hasMoreElements(); ) { JRadioButton rb = (JRadioButton)e.nextElement(); if (rb.getActionCommand().equals(styleName)) { rb.setSelected(true); break; }
< prev index next >