/[classpath]/classpath/javax/swing/plaf/basic/BasicButtonUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicButtonUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by mkoch, Tue Jan 25 07:07:25 2005 UTC revision 1.18 by rabbit78, Tue Apr 19 07:59:02 2005 UTC
# Line 247  public class BasicButtonUI extends Butto Line 247  public class BasicButtonUI extends Butto
247      Rectangle tr = new Rectangle();      Rectangle tr = new Rectangle();
248      Rectangle ir = new Rectangle();      Rectangle ir = new Rectangle();
249      Rectangle vr = new Rectangle();      Rectangle vr = new Rectangle();
     Rectangle br = new Rectangle();  
250    
251      Font f = c.getFont();      Font f = c.getFont();
252    
253      g.setFont(f);      g.setFont(f);
254    
255      SwingUtilities.calculateInnerArea(b, br);      SwingUtilities.calculateInnerArea(b, vr);
     SwingUtilities.calculateInsetArea(br, b.getMargin(), vr);      
256      String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),      String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
257                                                       b.getText(),                                                       b.getText(),
258                                                       currentIcon(b),                                                       currentIcon(b),
# Line 270  public class BasicButtonUI extends Butto Line 268  public class BasicButtonUI extends Butto
268          || b.isSelected())          || b.isSelected())
269        paintButtonPressed(g, b);        paintButtonPressed(g, b);
270      else      else
271        paintButtonNormal(g, br, c);        paintButtonNormal(g, vr, c);
272                    
273      paintIcon(g, c, ir);      paintIcon(g, c, ir);
274      if (text != null)      if (text != null)

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26