home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &… the Search for Life CD 3 / 0_CD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / swing / plaf / basic / BasicComboPopup$InvocationKeyHandler.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  987 b   |  29 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.event.KeyAdapter;
  4. import java.awt.event.KeyEvent;
  5.  
  6. public class BasicComboPopup$InvocationKeyHandler extends KeyAdapter {
  7.    // $FF: synthetic field
  8.    private final BasicComboPopup this$0;
  9.  
  10.    public BasicComboPopup$InvocationKeyHandler(BasicComboPopup var1) {
  11.       this.this$0 = var1;
  12.    }
  13.  
  14.    public void keyReleased(KeyEvent var1) {
  15.       if (var1.getKeyCode() == 32 || var1.getKeyCode() == 10) {
  16.          if (this.this$0.isVisible()) {
  17.             if (BasicComboPopup.access$000(this.this$0)) {
  18.                this.this$0.comboBox.setSelectedIndex(this.this$0.list.getSelectedIndex());
  19.             } else {
  20.                this.this$0.togglePopup();
  21.             }
  22.          } else if (var1.getKeyCode() == 32) {
  23.             this.this$0.togglePopup();
  24.          }
  25.       }
  26.  
  27.    }
  28. }
  29.