1 7 8 package com.sun.java.swing.plaf.motif; 9 10 import javax.swing.*; 11 12 import javax.swing.plaf.*; 13 14 import java.awt.*; 15 16 29 public class MotifCheckBoxUI extends MotifRadioButtonUI { 30 31 private static final MotifCheckBoxUI motifCheckBoxUI = new MotifCheckBoxUI(); 32 33 private final static String propertyPrefix = "CheckBox" + "."; 34 35 private boolean defaults_initialized = false; 36 37 38 public static ComponentUI createUI(JComponent c){ 42 return motifCheckBoxUI; 43 } 44 45 public String getPropertyPrefix() { 46 return propertyPrefix; 47 } 48 49 public void installDefaults(AbstractButton b) { 53 super.installDefaults(b); 54 if(!defaults_initialized) { 55 icon = UIManager.getIcon(getPropertyPrefix() + "icon"); 56 defaults_initialized = true; 57 } 58 } 59 60 protected void uninstallDefaults(AbstractButton b) { 61 super.uninstallDefaults(b); 62 defaults_initialized = false; 63 } 64 } 65 | Popular Tags |