1 7 8 package com.sun.java.swing.plaf.windows; 9 10 import javax.swing.plaf.basic.*; 11 import javax.swing.*; 12 import javax.swing.plaf.*; 13 14 import java.awt.*; 15 16 29 public class WindowsCheckBoxUI extends WindowsRadioButtonUI 30 { 31 35 private static final WindowsCheckBoxUI windowsCheckBoxUI = new WindowsCheckBoxUI(); 36 37 private final static String propertyPrefix = "CheckBox" + "."; 38 39 private boolean defaults_initialized = false; 40 41 public static ComponentUI createUI(JComponent c) { 45 return windowsCheckBoxUI; 46 } 47 48 49 public String getPropertyPrefix() { 50 return propertyPrefix; 51 } 52 53 public void installDefaults(AbstractButton b) { 57 super.installDefaults(b); 58 if(!defaults_initialized) { 59 icon = UIManager.getIcon(getPropertyPrefix() + "icon"); 60 defaults_initialized = true; 61 } 62 } 63 64 public void uninstallDefaults(AbstractButton b) { 65 super.uninstallDefaults(b); 66 defaults_initialized = false; 67 } 68 69 } 70 71 | Popular Tags |