132 |
b.setIconTextGap(defaults.getInt(prefix + "textIconGap")); |
b.setIconTextGap(defaults.getInt(prefix + "textIconGap")); |
133 |
b.setInputMap(JComponent.WHEN_FOCUSED, |
b.setInputMap(JComponent.WHEN_FOCUSED, |
134 |
(InputMap) defaults.get(prefix + "focusInputMap")); |
(InputMap) defaults.get(prefix + "focusInputMap")); |
135 |
|
b.setRolloverEnabled(defaults.getBoolean(prefix + "rollover")); |
136 |
b.setOpaque(true); |
b.setOpaque(true); |
137 |
} |
} |
138 |
|
|
409 |
|
|
410 |
if (b.isEnabled()) |
if (b.isEnabled()) |
411 |
{ |
{ |
412 |
g.setColor(b.getForeground()); |
g.setColor(b.getForeground()); |
413 |
g.drawString(text, textRect.x, textRect.y + fm.getAscent()); |
g.drawString(text, textRect.x, textRect.y + fm.getAscent()); |
414 |
} |
} |
415 |
else |
else |
416 |
{ |
{ |
417 |
g.setColor(b.getBackground().brighter()); |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
418 |
g.drawString(text, textRect.x, textRect.y + fm.getAscent()); |
String prefix = getPropertyPrefix(); |
419 |
g.setColor(b.getBackground().darker()); |
g.setColor(defaults.getColor(prefix + "disabledText")); |
420 |
g.drawString(text, textRect.x + 1, textRect.y + fm.getAscent() + 1); |
g.drawString(text, textRect.x, textRect.y + fm.getAscent()); |
421 |
} |
} |
422 |
} |
} |
423 |
} |
} |