|
|
@ -125,8 +125,7 @@ public class UICheckBox extends JCheckBox implements UIObserver, GlobalNameObser |
|
|
|
|
|
|
|
|
|
|
|
private class UICheckBoxUI extends MetalCheckBoxUI { |
|
|
|
private class UICheckBoxUI extends MetalCheckBoxUI { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void paint(Graphics g, JComponent c) { |
|
|
|
public synchronized void paint(Graphics g, JComponent c) { |
|
|
|
synchronized (this) { |
|
|
|
|
|
|
|
AbstractButton b = (AbstractButton) c; |
|
|
|
AbstractButton b = (AbstractButton) c; |
|
|
|
ButtonModel model = b.getModel(); |
|
|
|
ButtonModel model = b.getModel(); |
|
|
|
Dimension size = c.getSize(); |
|
|
|
Dimension size = c.getSize(); |
|
|
@ -179,7 +178,6 @@ public class UICheckBox extends JCheckBox implements UIObserver, GlobalNameObser |
|
|
|
// Draw the Text
|
|
|
|
// Draw the Text
|
|
|
|
drawLine(text, g, b, c, textRect, fm); |
|
|
|
drawLine(text, g, b, c, textRect, fm); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void drawLine(String text, Graphics g, AbstractButton b, JComponent c, Rectangle textRect, FontMetrics fm) { |
|
|
|
private void drawLine(String text, Graphics g, AbstractButton b, JComponent c, Rectangle textRect, FontMetrics fm) { |
|
|
|
if (text != null) { |
|
|
|
if (text != null) { |
|
|
|