src/share/classes/javax/swing/JComboBox.java

Print this page

        

*** 1088,1098 **** } firePropertyChange("action", oldValue, action); } } ! private boolean isListener(Class c, ActionListener a) { boolean isListener = false; Object[] listeners = listenerList.getListenerList(); for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]==c && listeners[i+1]==a) { isListener=true; --- 1088,1098 ---- } firePropertyChange("action", oldValue, action); } } ! private boolean isListener(Class<?> c, ActionListener a) { boolean isListener = false; Object[] listeners = listenerList.getListenerList(); for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]==c && listeners[i+1]==a) { isListener=true;
*** 1514,1528 **** * @param aModel a ComboBoxModel -- the component's data model, containing * the list of selectable items * @return an int equal to the selected row, where 0 is the * first item and -1 is none. */ ! int selectionForKey(char aKey,ComboBoxModel aModel); } class DefaultKeySelectionManager implements KeySelectionManager, Serializable { ! public int selectionForKey(char aKey,ComboBoxModel aModel) { int i,c; int currentSelection = -1; Object selectedItem = aModel.getSelectedItem(); String v; String pattern; --- 1514,1528 ---- * @param aModel a ComboBoxModel -- the component's data model, containing * the list of selectable items * @return an int equal to the selected row, where 0 is the * first item and -1 is none. */ ! int selectionForKey(char aKey,ComboBoxModel<?> aModel); } class DefaultKeySelectionManager implements KeySelectionManager, Serializable { ! public int selectionForKey(char aKey,ComboBoxModel<?> aModel) { int i,c; int currentSelection = -1; Object selectedItem = aModel.getSelectedItem(); String v; String pattern;
*** 1640,1650 **** @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJComboBox extends AccessibleJComponent implements AccessibleAction, AccessibleSelection { ! private JList popupList; // combo box popup list private Accessible previousSelectedAccessible = null; /** * Returns an AccessibleJComboBox instance * @since 1.4 --- 1640,1650 ---- @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJComboBox extends AccessibleJComponent implements AccessibleAction, AccessibleSelection { ! private JList<?> popupList; // combo box popup list private Accessible previousSelectedAccessible = null; /** * Returns an AccessibleJComboBox instance * @since 1.4
*** 1964,1974 **** JComboBox.this.getUI().getAccessibleChild(JComboBox.this, 0); if (a != null && a instanceof javax.swing.plaf.basic.ComboPopup) { // get the popup list ! JList list = ((javax.swing.plaf.basic.ComboPopup)a).getList(); // return the i-th selection in the popup list AccessibleContext ac = list.getAccessibleContext(); if (ac != null) { AccessibleSelection as = ac.getAccessibleSelection(); --- 1964,1975 ---- JComboBox.this.getUI().getAccessibleChild(JComboBox.this, 0); if (a != null && a instanceof javax.swing.plaf.basic.ComboPopup) { // get the popup list ! @SuppressWarnings("unchecked") ! JList<?> list = ((javax.swing.plaf.basic.ComboPopup)a).getList(); // return the i-th selection in the popup list AccessibleContext ac = list.getAccessibleContext(); if (ac != null) { AccessibleSelection as = ac.getAccessibleSelection();