diff options
Diffstat (limited to 'libjava/javax/swing/plaf/basic/BasicButtonUI.java')
-rw-r--r-- | libjava/javax/swing/plaf/basic/BasicButtonUI.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libjava/javax/swing/plaf/basic/BasicButtonUI.java b/libjava/javax/swing/plaf/basic/BasicButtonUI.java index 3f67c51..d901e7d 100644 --- a/libjava/javax/swing/plaf/basic/BasicButtonUI.java +++ b/libjava/javax/swing/plaf/basic/BasicButtonUI.java @@ -74,14 +74,7 @@ public class BasicButtonUI extends ButtonUI public Dimension getPreferredSize(JComponent c) { AbstractButton b = (AbstractButton)c; - Dimension d = BasicGraphicsUtils.getPreferredSize(b, - gap, - b.getText(), - b.getIcon(), - b.getVerticalAlignment(), - b.getHorizontalAlignment(), - b.getHorizontalTextPosition(), - b.getVerticalTextPosition()); + Dimension d = BasicGraphicsUtils.getPreferredButtonSize(b, gap); // System.out.println("^^^^^^^^^^^^^^^^^^^^^^ BASIC-PREF="+d + ",T="+b.text); return d; } @@ -99,7 +92,7 @@ public class BasicButtonUI extends ButtonUI g.setFont(f); - FontMetrics fm = SwingUtilities.getFontMetrics(f); + FontMetrics fm = g.getFontMetrics(f); Insets i = c.getInsets(); @@ -198,7 +191,7 @@ public class BasicButtonUI extends ButtonUI g.setFont(f); - FontMetrics fm = SwingUtilities.getFontMetrics(f); + FontMetrics fm = g.getFontMetrics(f); g.setColor(c.isEnabled() ? textColor : disabledTextColor); |