summaryrefslogtreecommitdiff
path: root/javax/swing/JComboBox.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/JComboBox.java')
-rw-r--r--javax/swing/JComboBox.java30
1 files changed, 27 insertions, 3 deletions
diff --git a/javax/swing/JComboBox.java b/javax/swing/JComboBox.java
index 5c5da42f6..9425ac258 100644
--- a/javax/swing/JComboBox.java
+++ b/javax/swing/JComboBox.java
@@ -944,10 +944,20 @@ public class JComboBox extends JComponent implements ItemSelectable,
* exists in the combo box. Otherwise false is returned.
*/
public boolean selectWithKeyChar(char keyChar)
- throws NotImplementedException
{
- // FIXME: Need to implement
- return false;
+ if (keySelectionManager == null)
+ {
+ keySelectionManager = createDefaultKeySelectionManager();
+ }
+
+ int index = keySelectionManager.selectionForKey(keyChar, getModel());
+ boolean retVal = false;
+ if (index >= 0)
+ {
+ setSelectedIndex(index);
+ retVal = true;
+ }
+ return retVal;
}
/**
@@ -1215,26 +1225,31 @@ public class JComboBox extends JComponent implements ItemSelectable,
}
public int getAccessibleChildrenCount()
+ throws NotImplementedException
{
return 0;
}
public Accessible getAccessibleChild(int value0)
+ throws NotImplementedException
{
return null;
}
public AccessibleSelection getAccessibleSelection()
+ throws NotImplementedException
{
return null;
}
public Accessible getAccessibleSelection(int value0)
+ throws NotImplementedException
{
return null;
}
public boolean isAccessibleChildSelected(int value0)
+ throws NotImplementedException
{
return false;
}
@@ -1245,46 +1260,55 @@ public class JComboBox extends JComponent implements ItemSelectable,
}
public AccessibleAction getAccessibleAction()
+ throws NotImplementedException
{
return null;
}
public String getAccessibleActionDescription(int value0)
+ throws NotImplementedException
{
return null;
}
public int getAccessibleActionCount()
+ throws NotImplementedException
{
return 0;
}
public boolean doAccessibleAction(int value0)
+ throws NotImplementedException
{
return false;
}
public int getAccessibleSelectionCount()
+ throws NotImplementedException
{
return 0;
}
public void addAccessibleSelection(int value0)
+ throws NotImplementedException
{
// TODO: Implement this properly.
}
public void removeAccessibleSelection(int value0)
+ throws NotImplementedException
{
// TODO: Implement this properly.
}
public void clearAccessibleSelection()
+ throws NotImplementedException
{
// TODO: Implement this properly.
}
public void selectAllAccessibleSelection()
+ throws NotImplementedException
{
// TODO: Implement this properly.
}