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 (); |
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 |
|
|
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 |
|
|