115 |
*/ |
*/ |
116 |
protected String getPropertyPrefix() |
protected String getPropertyPrefix() |
117 |
{ |
{ |
118 |
return "Button"; |
return "Button."; |
119 |
} |
} |
120 |
|
|
121 |
protected void installDefaults(AbstractButton b) |
protected void installDefaults(AbstractButton b) |
122 |
{ |
{ |
123 |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
124 |
String prefix = getPropertyPrefix(); |
String prefix = getPropertyPrefix(); |
125 |
focusColor = defaults.getColor(prefix + ".focus"); |
focusColor = defaults.getColor(prefix + "focus"); |
126 |
b.setForeground(defaults.getColor(prefix + ".foreground")); |
b.setForeground(defaults.getColor(prefix + "foreground")); |
127 |
b.setBackground(defaults.getColor(prefix + ".background")); |
b.setBackground(defaults.getColor(prefix + "background")); |
128 |
b.setMargin(defaults.getInsets(prefix + ".margin")); |
b.setMargin(defaults.getInsets(prefix + "margin")); |
129 |
b.setBorder(defaults.getBorder(prefix + ".border")); |
b.setBorder(defaults.getBorder(prefix + "border")); |
130 |
b.setIconTextGap(defaults.getInt(prefix + ".textIconGap")); |
b.setIconTextGap(defaults.getInt(prefix + "textIconGap")); |
131 |
b.setInputMap(JComponent.WHEN_FOCUSED, |
b.setInputMap(JComponent.WHEN_FOCUSED, |
132 |
(InputMap) defaults.get(prefix + ".focusInputMap")); |
(InputMap) defaults.get(prefix + "focusInputMap")); |
133 |
b.setOpaque(true); |
b.setOpaque(true); |
134 |
} |
} |
135 |
|
|