< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java

Print this page

        

*** 100,109 **** --- 100,110 ---- // ******************************** // Install PLAF // ******************************** public void installUI(JComponent c) { + super.installUI(c); installDefaults((AbstractButton) c); installListeners((AbstractButton) c); installKeyboardActions((AbstractButton) c); BasicHTML.updateRenderer(c, ((AbstractButton) c).getText()); }
*** 379,399 **** /* Draw the Text */ if(model.isEnabled()) { /*** paint the text normally */ g.setColor(b.getForeground()); ! SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, textRect.x + getTextShiftOffset(), textRect.y + fm.getAscent() + getTextShiftOffset()); } else { /*** paint the text disabled ***/ g.setColor(b.getBackground().brighter()); ! SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, textRect.x, textRect.y + fm.getAscent()); g.setColor(b.getBackground().darker()); ! SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, textRect.x - 1, textRect.y + fm.getAscent() - 1); } } /** --- 380,400 ---- /* Draw the Text */ if(model.isEnabled()) { /*** paint the text normally */ g.setColor(b.getForeground()); ! getTextUIDrawing().drawStringUnderlineCharAt(c, g,text, mnemonicIndex, textRect.x + getTextShiftOffset(), textRect.y + fm.getAscent() + getTextShiftOffset()); } else { /*** paint the text disabled ***/ g.setColor(b.getBackground().brighter()); ! getTextUIDrawing().drawStringUnderlineCharAt(c, g,text, mnemonicIndex, textRect.x, textRect.y + fm.getAscent()); g.setColor(b.getBackground().darker()); ! getTextUIDrawing().drawStringUnderlineCharAt(c, g,text, mnemonicIndex, textRect.x - 1, textRect.y + fm.getAscent() - 1); } } /**
< prev index next >