53 |
|
|
54 |
|
|
55 |
/** |
/** |
56 |
* A UI delegate for the {@link JRadioButton} component under the |
* A UI delegate for the {@link JRadioButton} component. |
|
* {@link MetalLookAndFeel}. |
|
57 |
*/ |
*/ |
58 |
public class MetalRadioButtonUI |
public class MetalRadioButtonUI |
59 |
extends BasicRadioButtonUI |
extends BasicRadioButtonUI |
69 |
protected Color disabledTextColor; |
protected Color disabledTextColor; |
70 |
|
|
71 |
/** |
/** |
72 |
* Constructs a new instance of MetalRadioButtonUI. |
* Constructs a new instance of <code>MetalRadioButtonUI</code>. |
73 |
*/ |
*/ |
74 |
public MetalRadioButtonUI() |
public MetalRadioButtonUI() |
75 |
{ |
{ |
77 |
} |
} |
78 |
|
|
79 |
/** |
/** |
80 |
* Returns an instance of MetalRadioButtonUI. |
* Returns a new instance of <code>MetalRadioButtonUI</code>. |
81 |
* |
* |
82 |
* @param component the component for which we return an UI instance |
* @param component the component for which we return an UI instance |
83 |
* |
* |
84 |
* @return an instance of MetalRadioButtonUI |
* @return A new instance of <code>MetalRadioButtonUI</code>. |
85 |
*/ |
*/ |
86 |
public static ComponentUI createUI(JComponent component) |
public static ComponentUI createUI(JComponent component) |
87 |
{ |
{ |
178 |
protected void paintFocus(Graphics g, Rectangle t, Dimension d) |
protected void paintFocus(Graphics g, Rectangle t, Dimension d) |
179 |
{ |
{ |
180 |
g.setColor(focusColor); |
g.setColor(focusColor); |
181 |
g.drawRect(t.x, t.y, t.width, t.height); |
// minus 2 because of line thickness. Prevents border |
182 |
// FIXME: we seem to be drawing too tight a rectangle here, perhaps there |
// from being cutoff. |
183 |
// is some padding to do somewhere??? |
g.drawRect(t.x, t.y, t.width - 2, t.height - 2); |
184 |
} |
} |
185 |
|
|
186 |
} |
} |