summaryrefslogtreecommitdiff
path: root/javax/swing/plaf/basic/BasicButtonUI.java
diff options
context:
space:
mode:
authorSascha Brawer <brawer@dandelis.ch>2003-06-18 12:00:35 +0000
committerSascha Brawer <brawer@dandelis.ch>2003-06-18 12:00:35 +0000
commitef1ba1af35d524fe777948578869229dfef30174 (patch)
tree6a4d0fee22bd73cdb537e4b1dfeafa456d776ffd /javax/swing/plaf/basic/BasicButtonUI.java
parent2462ba8a2c5b984a81bc1fd711b7163ea08f9cf8 (diff)
downloadclasspath-ef1ba1af35d524fe777948578869229dfef30174.tar.gz
paint, paintText: Don't use methods that are not part of the official API.
Diffstat (limited to 'javax/swing/plaf/basic/BasicButtonUI.java')
-rw-r--r--javax/swing/plaf/basic/BasicButtonUI.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/javax/swing/plaf/basic/BasicButtonUI.java b/javax/swing/plaf/basic/BasicButtonUI.java
index 3f67c5128..d901e7dde 100644
--- a/javax/swing/plaf/basic/BasicButtonUI.java
+++ b/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);