home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import javax.swing.event.ListSelectionEvent;
- import javax.swing.event.ListSelectionListener;
-
- public class BasicComboPopup$ListSelectionHandler implements ListSelectionListener {
- // $FF: synthetic field
- private final BasicComboPopup this$0;
-
- protected BasicComboPopup$ListSelectionHandler(BasicComboPopup var1) {
- this.this$0 = var1;
- }
-
- public void valueChanged(ListSelectionEvent var1) {
- if (!BasicComboPopup.access$0(this.this$0) && !this.this$0.valueIsAdjusting && !var1.getValueIsAdjusting() && this.this$0.list.getSelectedIndex() != this.this$0.comboBox.getSelectedIndex() && this.this$0.list.getSelectedIndex() < this.this$0.comboBox.getItemCount() && this.this$0.list.getSelectedIndex() >= -1) {
- this.this$0.valueIsAdjusting = true;
- this.this$0.comboBox.setSelectedIndex(this.this$0.list.getSelectedIndex());
- this.this$0.list.ensureIndexIsVisible(this.this$0.list.getSelectedIndex());
- this.this$0.valueIsAdjusting = false;
- }
-
- }
- }
-