src/share/classes/javax/swing/JComboBox.java
Print this page
*** 1098,1108 ****
}
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;
--- 1098,1108 ----
}
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;
*** 1528,1542 ****
* @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;
--- 1528,1542 ----
* @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;
*** 1654,1664 ****
@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
--- 1654,1664 ----
@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
*** 1978,1988 ****
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();
--- 1978,1989 ----
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();