52 |
import javax.swing.JComponent; |
import javax.swing.JComponent; |
53 |
import javax.swing.LookAndFeel; |
import javax.swing.LookAndFeel; |
54 |
import javax.swing.SwingUtilities; |
import javax.swing.SwingUtilities; |
|
import javax.swing.UIDefaults; |
|
55 |
import javax.swing.UIManager; |
import javax.swing.UIManager; |
56 |
import javax.swing.plaf.ButtonUI; |
import javax.swing.plaf.ButtonUI; |
57 |
import javax.swing.plaf.ComponentUI; |
import javax.swing.plaf.ComponentUI; |
160 |
b.setIconTextGap(UIManager.getInt(prefix + "textIconGap")); |
b.setIconTextGap(UIManager.getInt(prefix + "textIconGap")); |
161 |
b.setInputMap(JComponent.WHEN_FOCUSED, |
b.setInputMap(JComponent.WHEN_FOCUSED, |
162 |
(InputMap) UIManager.get(prefix + "focusInputMap")); |
(InputMap) UIManager.get(prefix + "focusInputMap")); |
|
b.setRolloverEnabled(UIManager.getBoolean(prefix + "rollover")); |
|
163 |
} |
} |
164 |
|
|
165 |
/** |
/** |
442 |
} |
} |
443 |
else |
else |
444 |
{ |
{ |
|
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
|
445 |
String prefix = getPropertyPrefix(); |
String prefix = getPropertyPrefix(); |
446 |
g.setColor(defaults.getColor(prefix + "disabledText")); |
g.setColor(UIManager.getColor(prefix + "disabledText")); |
447 |
g.drawString(text, textRect.x, textRect.y + fm.getAscent()); |
g.drawString(text, textRect.x, textRect.y + fm.getAscent()); |
448 |
} |
} |
449 |
} |
} |