44 |
|
|
45 |
import javax.swing.Icon; |
import javax.swing.Icon; |
46 |
import javax.swing.JCheckBox; |
import javax.swing.JCheckBox; |
47 |
|
import javax.swing.SwingConstants; |
48 |
|
import javax.swing.UIManager; |
49 |
import javax.swing.plaf.UIResource; |
import javax.swing.plaf.UIResource; |
50 |
|
|
51 |
/** |
/** |
130 |
*/ |
*/ |
131 |
public void paintIcon(Component c, Graphics g, int x, int y) |
public void paintIcon(Component c, Graphics g, int x, int y) |
132 |
{ |
{ |
133 |
|
if (UIManager.get("CheckBox.gradient") != null) |
134 |
|
MetalUtils.paintGradient(g, x, y, getIconWidth(), getIconHeight(), |
135 |
|
SwingConstants.VERTICAL, "CheckBox.gradient"); |
136 |
border.paintBorder(c, g, x, y, getIconWidth(), getIconHeight()); |
border.paintBorder(c, g, x, y, getIconWidth(), getIconHeight()); |
137 |
JCheckBox cb = (JCheckBox) c; |
JCheckBox cb = (JCheckBox) c; |
138 |
if (cb.isSelected()) |
if (cb.isSelected()) |