< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java

Print this page

        

*** 73,82 **** --- 73,84 ---- */ protected Color disabledTextColor; private boolean defaults_initialized = false; + private TextUIDrawing textUIDrawing; + // ******************************** // Create PlAF // ******************************** /**
*** 106,120 **** --- 108,127 ---- selectColor = UIManager.getColor(getPropertyPrefix() + "select"); disabledTextColor = UIManager.getColor(getPropertyPrefix() + "disabledText"); defaults_initialized = true; } LookAndFeel.installProperty(b, "opaque", Boolean.TRUE); + textUIDrawing = SwingUtilities2.getTextUIDrawing(textUIDrawing); } protected void uninstallDefaults(AbstractButton b) { super.uninstallDefaults(b); defaults_initialized = false; + if (textUIDrawing != SwingUtilities2.DEFAULT_UI_TEXT_DRAWING + && textUIDrawing instanceof UIResource) { + textUIDrawing = SwingUtilities2.DEFAULT_UI_TEXT_DRAWING; + } } // ******************************** // Default Accessors // ********************************
*** 242,252 **** g.setColor(b.getForeground()); } else { // *** paint the text disabled g.setColor(getDisabledTextColor()); } ! SwingUtilities2.drawStringUnderlineCharAt(c,g,text, mnemIndex, textRect.x, textRect.y + fm.getAscent()); } if(b.hasFocus() && b.isFocusPainted() && textRect.width > 0 && textRect.height > 0 ) { paintFocus(g,textRect,size); --- 249,259 ---- g.setColor(b.getForeground()); } else { // *** paint the text disabled g.setColor(getDisabledTextColor()); } ! textUIDrawing.drawStringUnderlineCharAt(c,g,text, mnemIndex, textRect.x, textRect.y + fm.getAscent()); } if(b.hasFocus() && b.isFocusPainted() && textRect.width > 0 && textRect.height > 0 ) { paintFocus(g,textRect,size);
< prev index next >