/[classpath]/classpath/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java

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

revision 1.27 by mkoch, Wed Sep 22 11:03:09 2004 UTC revision 1.28 by mkoch, Fri Oct 8 21:41:41 2004 UTC
# Line 66  public class GtkTextFieldPeer extends Gt Line 66  public class GtkTextFieldPeer extends Gt
66          awtComponent.setFont (f);          awtComponent.setFont (f);
67        }        }
68    
69      FontMetrics fm;      FontMetrics fm = getFontMetrics (f);
     if (GtkToolkit.useGraphics2D ())  
       fm = new GdkClasspathFontPeerMetrics (f);  
     else  
       fm = new GdkFontMetrics (f);  
70    
71      TextField tf = ((TextField) awtComponent);      TextField tf = ((TextField) awtComponent);
72      int cols = tf.getColumns ();      int cols = tf.getColumns ();
# Line 117  public class GtkTextFieldPeer extends Gt Line 113  public class GtkTextFieldPeer extends Gt
113      if (f == null)      if (f == null)
114        return new Dimension (2 * gtkEntryGetBorderWidth (), dim[1]);        return new Dimension (2 * gtkEntryGetBorderWidth (), dim[1]);
115    
116      FontMetrics fm;      FontMetrics fm = getFontMetrics (f);
     if (GtkToolkit.useGraphics2D ())  
       fm = new GdkClasspathFontPeerMetrics (f);  
     else  
       fm = new GdkFontMetrics (f);  
117    
118      int text_width = cols * fm.getMaxAdvance ();      int text_width = cols * fm.getMaxAdvance ();
119    
# Line 140  public class GtkTextFieldPeer extends Gt Line 132  public class GtkTextFieldPeer extends Gt
132      if (f == null)      if (f == null)
133        return new Dimension (2 * gtkEntryGetBorderWidth (), dim[1]);        return new Dimension (2 * gtkEntryGetBorderWidth (), dim[1]);
134    
135      FontMetrics fm;      FontMetrics fm = getFontMetrics (f);
     if (GtkToolkit.useGraphics2D ())  
       fm = new GdkClasspathFontPeerMetrics (f);  
     else  
       fm = new GdkFontMetrics (f);  
136    
137      int text_width = cols * fm.getMaxAdvance ();      int text_width = cols * fm.getMaxAdvance ();
138    

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

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