equal
deleted
inserted
replaced
494 } |
494 } |
495 |
495 |
496 // This is somewhat messy. The difference here from BasicComboBoxUI.EnterAction is that |
496 // This is somewhat messy. The difference here from BasicComboBoxUI.EnterAction is that |
497 // arrow up or down does not automatically select the |
497 // arrow up or down does not automatically select the |
498 @SuppressWarnings("serial") // anonymous class |
498 @SuppressWarnings("serial") // anonymous class |
499 private static final Action triggerSelectionAction = new AbstractAction() { |
499 private final Action triggerSelectionAction = new AbstractAction() { |
500 public void actionPerformed(final ActionEvent e) { |
500 public void actionPerformed(final ActionEvent e) { |
501 triggerSelectionEvent((JComboBox)e.getSource(), e); |
501 triggerSelectionEvent((JComboBox)e.getSource(), e); |
|
502 } |
|
503 |
|
504 @Override |
|
505 public boolean isEnabled() { |
|
506 return comboBox.isPopupVisible() && super.isEnabled(); |
502 } |
507 } |
503 }; |
508 }; |
504 |
509 |
505 @SuppressWarnings("serial") // anonymous class |
510 @SuppressWarnings("serial") // anonymous class |
506 private static final Action toggleSelectionAction = new AbstractAction() { |
511 private static final Action toggleSelectionAction = new AbstractAction() { |