home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 144 / DPCS0200.iso / Internet / Supanet / system / swing.jar / javax / swing / plaf / basic / BasicComboPopup$ListSelectionHandler.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-05  |  1.2 KB  |  24 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import javax.swing.event.ListSelectionEvent;
  4. import javax.swing.event.ListSelectionListener;
  5.  
  6. public class BasicComboPopup$ListSelectionHandler implements ListSelectionListener {
  7.    // $FF: synthetic field
  8.    private final BasicComboPopup this$0;
  9.  
  10.    protected BasicComboPopup$ListSelectionHandler(BasicComboPopup var1) {
  11.       this.this$0 = var1;
  12.    }
  13.  
  14.    public void valueChanged(ListSelectionEvent var1) {
  15.       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) {
  16.          this.this$0.valueIsAdjusting = true;
  17.          this.this$0.comboBox.setSelectedIndex(this.this$0.list.getSelectedIndex());
  18.          this.this$0.list.ensureIndexIsVisible(this.this$0.list.getSelectedIndex());
  19.          this.this$0.valueIsAdjusting = false;
  20.       }
  21.  
  22.    }
  23. }
  24.