jdk/src/share/classes/javax/swing/JComboBox.java
changeset 25110 e1f2746b6439
parent 23715 54ae9dd9df73
child 25144 e2bf17cee34b
equal deleted inserted replaced
25109:61e7baccc995 25110:e1f2746b6439
  1306     /**
  1306     /**
  1307      * This method is public as an implementation side effect.
  1307      * This method is public as an implementation side effect.
  1308      * do not call or override.
  1308      * do not call or override.
  1309      */
  1309      */
  1310     public void actionPerformed(ActionEvent e) {
  1310     public void actionPerformed(ActionEvent e) {
  1311         Object newItem = getEditor().getItem();
  1311         ComboBoxEditor editor = getEditor();
  1312         setPopupVisible(false);
  1312         if ((editor != null) && (e != null) && (editor == e.getSource())) {
  1313         getModel().setSelectedItem(newItem);
  1313             setPopupVisible(false);
  1314         String oldCommand = getActionCommand();
  1314             getModel().setSelectedItem(editor.getItem());
  1315         setActionCommand("comboBoxEdited");
  1315             String oldCommand = getActionCommand();
  1316         fireActionEvent();
  1316             setActionCommand("comboBoxEdited");
  1317         setActionCommand(oldCommand);
  1317             fireActionEvent();
       
  1318             setActionCommand(oldCommand);
       
  1319         }
  1318     }
  1320     }
  1319 
  1321 
  1320     /**
  1322     /**
  1321      * This method is public as an implementation side effect.
  1323      * This method is public as an implementation side effect.
  1322      * do not call or override.
  1324      * do not call or override.