< prev index next >
src/com/sun/interview/wizard/SearchDialog.java
Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg
*** 261,271 ****
b.setMnemonic(getMnemonic(uiKey));
setToolTipText(b, uiKey);
return b;
}
! private JComboBox createChoice(final String uiKey, final String[] choiceKeys) {
// create a cache of the presentation string, for use when
// rendering, but otherwise, let the JComboBox work in terms of the
// choiceKeys
final String[] choices = new String[choiceKeys.length];
for (int i = 0; i < choices.length; i++)
--- 261,271 ----
b.setMnemonic(getMnemonic(uiKey));
setToolTipText(b, uiKey);
return b;
}
! private JComboBox<String> createChoice(final String uiKey, final String[] choiceKeys) {
// create a cache of the presentation string, for use when
// rendering, but otherwise, let the JComboBox work in terms of the
// choiceKeys
final String[] choices = new String[choiceKeys.length];
for (int i = 0; i < choices.length; i++)
*** 275,285 ****
choice.setName(uiKey);
AccessibleContext ac = choice.getAccessibleContext();
ac.setAccessibleName(i18n.getString(uiKey + ".tip"));
choice.setRenderer(new DefaultListCellRenderer() {
! public Component getListCellRendererComponent(JList list, Object o, int index, boolean isSelected, boolean cellHasFocus) {
Object c = o;
for (int i = 0; i < choiceKeys.length; i++) {
if (choiceKeys[i] == o) {
c = choices[i];
break;
--- 275,285 ----
choice.setName(uiKey);
AccessibleContext ac = choice.getAccessibleContext();
ac.setAccessibleName(i18n.getString(uiKey + ".tip"));
choice.setRenderer(new DefaultListCellRenderer() {
! public Component getListCellRendererComponent(JList<?> list, Object o, int index, boolean isSelected, boolean cellHasFocus) {
Object c = o;
for (int i = 0; i < choiceKeys.length; i++) {
if (choiceKeys[i] == o) {
c = choices[i];
break;
*** 327,337 ****
private Interview interview;
private Question currentQuestion;
private HelpBroker helpBroker;
private String helpPrefix;
private JTextField textField;
! private JComboBox whereChoice;
private JCheckBox caseChk;
private JCheckBox wordChk;
private static final String ANSWER = "answer";
private static final String ANYWHERE = "anywhere";
--- 327,337 ----
private Interview interview;
private Question currentQuestion;
private HelpBroker helpBroker;
private String helpPrefix;
private JTextField textField;
! private JComboBox<String> whereChoice;
private JCheckBox caseChk;
private JCheckBox wordChk;
private static final String ANSWER = "answer";
private static final String ANYWHERE = "anywhere";
< prev index next >