65 */ 66 protected Color focusColor; 67 68 /** 69 * The color of a selected button. 70 */ 71 protected Color selectColor; 72 73 /** 74 * The color of a disabled text. 75 */ 76 protected Color disabledTextColor; 77 78 private boolean defaults_initialized = false; 79 80 // ******************************** 81 // Create PLAF 82 // ******************************** 83 84 /** 85 * Constructs the {@code MetalToogleButtonUI}. 86 * 87 * @param b a component 88 * @return the {@code MetalToogleButtonUI}. 89 */ 90 public static ComponentUI createUI(JComponent b) { 91 AppContext appContext = AppContext.getAppContext(); 92 MetalToggleButtonUI metalToggleButtonUI = 93 (MetalToggleButtonUI) appContext.get(METAL_TOGGLE_BUTTON_UI_KEY); 94 if (metalToggleButtonUI == null) { 95 metalToggleButtonUI = new MetalToggleButtonUI(); 96 appContext.put(METAL_TOGGLE_BUTTON_UI_KEY, metalToggleButtonUI); 97 } 98 return metalToggleButtonUI; 99 } 100 101 // ******************************** 102 // Install Defaults 103 // ******************************** 104 public void installDefaults(AbstractButton b) { | 65 */ 66 protected Color focusColor; 67 68 /** 69 * The color of a selected button. 70 */ 71 protected Color selectColor; 72 73 /** 74 * The color of a disabled text. 75 */ 76 protected Color disabledTextColor; 77 78 private boolean defaults_initialized = false; 79 80 // ******************************** 81 // Create PLAF 82 // ******************************** 83 84 /** 85 * Constructs a {@code MetalToggleButtonUI}. 86 */ 87 public MetalToggleButtonUI() {} 88 89 /** 90 * Constructs the {@code MetalToogleButtonUI}. 91 * 92 * @param b a component 93 * @return the {@code MetalToogleButtonUI}. 94 */ 95 public static ComponentUI createUI(JComponent b) { 96 AppContext appContext = AppContext.getAppContext(); 97 MetalToggleButtonUI metalToggleButtonUI = 98 (MetalToggleButtonUI) appContext.get(METAL_TOGGLE_BUTTON_UI_KEY); 99 if (metalToggleButtonUI == null) { 100 metalToggleButtonUI = new MetalToggleButtonUI(); 101 appContext.put(METAL_TOGGLE_BUTTON_UI_KEY, metalToggleButtonUI); 102 } 103 return metalToggleButtonUI; 104 } 105 106 // ******************************** 107 // Install Defaults 108 // ******************************** 109 public void installDefaults(AbstractButton b) { |