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

  1. package javax.swing.plaf.metal;
  2.  
  3. import javax.swing.AbstractButton;
  4. import javax.swing.JComponent;
  5. import javax.swing.UIManager;
  6. import javax.swing.plaf.ComponentUI;
  7.  
  8. public class MetalCheckBoxUI extends MetalRadioButtonUI {
  9.    private static final MetalCheckBoxUI checkboxUI = new MetalCheckBoxUI();
  10.    private static final String propertyPrefix = "CheckBox.";
  11.    private boolean defaults_initialized = false;
  12.  
  13.    public static ComponentUI createUI(JComponent var0) {
  14.       return checkboxUI;
  15.    }
  16.  
  17.    public String getPropertyPrefix() {
  18.       return "CheckBox.";
  19.    }
  20.  
  21.    public void installDefaults(AbstractButton var1) {
  22.       super.installDefaults(var1);
  23.       if (!this.defaults_initialized) {
  24.          super.icon = UIManager.getIcon(this.getPropertyPrefix() + "icon");
  25.          this.defaults_initialized = true;
  26.       }
  27.  
  28.    }
  29.  
  30.    protected void uninstallDefaults(AbstractButton var1) {
  31.       super.uninstallDefaults(var1);
  32.       this.defaults_initialized = false;
  33.    }
  34. }
  35.