src/macosx/classes/com/apple/laf/AquaComboBoxUI.java
Print this page
*** 279,288 ****
--- 279,290 ----
actionMap.put("aquaSelectHome", highlightFirstAction);
actionMap.put("aquaSelectEnd", highlightLastAction);
actionMap.put("aquaSelectPageUp", highlightPageUpAction);
actionMap.put("aquaSelectPageDown", highlightPageDownAction);
+ actionMap.put("aquaHidePopup", hideAction);
+
SwingUtilities.replaceUIActionMap(comboBox, actionMap);
}
abstract class ComboBoxAction extends AbstractAction {
public void actionPerformed(final ActionEvent e) {
*** 386,395 ****
--- 388,405 ----
listBox.ensureIndexIsVisible(target);
listBox.setSelectedIndex(target);
}
};
+ Action hideAction = new ComboBoxAction() {
+ @Override
+ void performComboBoxAction(final AquaComboBoxUI ui) {
+ comboBox.firePopupMenuCanceled();
+ comboBox.setPopupVisible(false);
+ }
+ };
+
// For <rdar://problem/3759984> Java 1.4.2_5: Serializing Swing components not working
// Inner classes were using a this reference and then trying to serialize the AquaComboBoxUI
// We shouldn't do that. But we need to be able to get the popup from other classes, so we need
// a public accessor.
public ComboPopup getPopup() {