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

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

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

revision 1.3 by egagnon, Sun Aug 11 20:08:43 2002 UTC revision 1.4 by brawer, Wed Jun 18 12:20:52 2003 UTC
# Line 65  public class BasicLabelUI extends LabelU Line 65  public class BasicLabelUI extends LabelU
65      public Dimension getPreferredSize(JComponent c)      public Dimension getPreferredSize(JComponent c)
66      {      {
67          JLabel b = (JLabel)c;          JLabel b = (JLabel)c;
68            /*
69              We cannot use this method because it is not part of the
70              official Swing API.
71    
72          Dimension d = BasicGraphicsUtils.getPreferredSize(b,          Dimension d = BasicGraphicsUtils.getPreferredSize(b,
73                                                            gap,                                                            gap,
74                                                            b.getText(),                                                            b.getText(),
# Line 74  public class BasicLabelUI extends LabelU Line 78  public class BasicLabelUI extends LabelU
78                                                            b.getHorizontalTextPosition(),                                                            b.getHorizontalTextPosition(),
79                                                            b.getVerticalTextPosition());                                                            b.getVerticalTextPosition());
80          System.out.println("JLABEL->^^^^^^^^^^^^^^^^^^^^^^   BASIC-PREF="+d + ",T="+b.getText());          System.out.println("JLABEL->^^^^^^^^^^^^^^^^^^^^^^   BASIC-PREF="+d + ",T="+b.getText());
81          return d;          */
82            return new Dimension(100, 30);
83      }      }
84            
85    
# Line 90  public class BasicLabelUI extends LabelU Line 95  public class BasicLabelUI extends LabelU
95    
96          g.setFont(f);          g.setFont(f);
97    
98          FontMetrics fm = SwingUtilities.getFontMetrics(f);          FontMetrics fm = g.getFontMetrics(f);
99    
100          Insets i = c.getInsets();          Insets i = c.getInsets();
101    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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