home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161a.iso / handson / files / copyjava.exe / com / sun / java / swing / plaf / metal / MetalComboBoxButton$MetalComboBoxButtonUI.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-26  |  2.3 KB  |  42 lines

  1. package com.sun.java.swing.plaf.metal;
  2.  
  3. import com.sun.java.swing.JComponent;
  4. import com.sun.java.swing.plaf.basic.BasicButtonUI;
  5.  
  6. class MetalComboBoxButton$MetalComboBoxButtonUI extends MetalButtonUI {
  7.    // $FF: synthetic field
  8.    private final MetalComboBoxButton this$0;
  9.    MetalComboBoxButton.MetalComboBoxButtonListener newListener;
  10.    MetalComboBoxButton.MetalComboBoxButtonKeyListener keyListener;
  11.    MetalComboBoxButton.MetalComboBoxButtonFocusListener focusListener;
  12.  
  13.    public MetalComboBoxButton$MetalComboBoxButtonUI(MetalComboBoxButton var1, MetalComboBoxButton var2) {
  14.       this.this$0 = var1;
  15.       this.this$0 = var1;
  16.       var1.getClass();
  17.       this.newListener = new MetalComboBoxButton.MetalComboBoxButtonListener(var1, var2);
  18.       var1.getClass();
  19.       this.keyListener = new MetalComboBoxButton.MetalComboBoxButtonKeyListener(var1, var2);
  20.       var1.getClass();
  21.       this.focusListener = new MetalComboBoxButton.MetalComboBoxButtonFocusListener(var1, var2);
  22.    }
  23.  
  24.    public void installUI(JComponent var1) {
  25.       super.installUI(var1);
  26.       this.this$0.removeMouseListener(BasicButtonUI.listener);
  27.       this.this$0.removeMouseMotionListener(BasicButtonUI.listener);
  28.       this.this$0.addMouseListener(this.newListener);
  29.       this.this$0.addMouseMotionListener(this.newListener);
  30.       this.this$0.addKeyListener(this.keyListener);
  31.       this.this$0.addFocusListener(this.focusListener);
  32.    }
  33.  
  34.    public void uninstallUI(JComponent var1) {
  35.       this.this$0.removeMouseListener(this.newListener);
  36.       this.this$0.removeMouseMotionListener(this.newListener);
  37.       this.this$0.removeKeyListener(this.keyListener);
  38.       this.this$0.removeFocusListener(this.focusListener);
  39.       super.uninstallUI(var1);
  40.    }
  41. }
  42.