38 |
|
|
39 |
package javax.swing.plaf.basic; |
package javax.swing.plaf.basic; |
40 |
|
|
41 |
|
import java.awt.Color; |
42 |
|
import java.awt.Dimension; |
43 |
import java.awt.Font; |
import java.awt.Font; |
44 |
import java.awt.Graphics; |
import java.awt.Graphics; |
45 |
import java.awt.Rectangle; |
import java.awt.Rectangle; |
159 |
} |
} |
160 |
if (text != null) |
if (text != null) |
161 |
paintText(g, b, tr, text); |
paintText(g, b, tr, text); |
162 |
paintFocus(g, b, vr, tr, ir); |
// TODO: Figure out what is the size parameter? |
163 |
|
paintFocus(g, tr, null); |
164 |
|
} |
165 |
|
|
166 |
|
/** |
167 |
|
* Paints the focus indicator for JRadioButtons. |
168 |
|
* |
169 |
|
* @param g the graphics context |
170 |
|
* @param tr the rectangle for the text label |
171 |
|
* @param size the size (??) |
172 |
|
*/ |
173 |
|
// TODO: Figure out what for is the size parameter. |
174 |
|
protected void paintFocus(Graphics g, Rectangle tr, Dimension size) |
175 |
|
{ |
176 |
|
Color focusColor = UIManager.getColor(getPropertyPrefix() + ".focus"); |
177 |
|
Color saved = g.getColor(); |
178 |
|
g.setColor(focusColor); |
179 |
|
g.drawRect(tr.x, tr.y, tr.width, tr.height); |
180 |
|
g.setColor(saved); |
181 |
} |
} |
182 |
} |
} |