1 7 8 package javax.swing.plaf.metal; 9 10 import javax.swing.*; 11 import javax.swing.plaf.basic.BasicCheckBoxUI ; 12 13 import java.awt.*; 14 import java.awt.event.*; 15 import javax.swing.plaf.*; 16 import java.io.Serializable ; 17 18 19 35 public class MetalCheckBoxUI extends MetalRadioButtonUI { 36 37 41 private final static MetalCheckBoxUI checkboxUI = new MetalCheckBoxUI (); 42 43 private final static String propertyPrefix = "CheckBox" + "."; 44 45 private boolean defaults_initialized = false; 46 47 public static ComponentUI createUI(JComponent b) { 51 return checkboxUI; 52 } 53 54 public String getPropertyPrefix() { 55 return propertyPrefix; 56 } 57 58 public void installDefaults(AbstractButton b) { 62 super.installDefaults(b); 63 if(!defaults_initialized) { 64 icon = UIManager.getIcon(getPropertyPrefix() + "icon"); 65 defaults_initialized = true; 66 } 67 } 68 69 protected void uninstallDefaults(AbstractButton b) { 70 super.uninstallDefaults(b); 71 defaults_initialized = false; 72 } 73 74 } 75 | Popular Tags |