Lines Matching refs:metrics

121         FontMetrics metrics = SwingUtilities2.getFontMetrics(component, g);
165 nextX += metrics.charWidth(' ');
168 nextX += metrics.charWidth(' ') + spaceAddon;
199 * @param metrics the font metrics to use for the calculation
206 public static final int getTabbedTextWidth(Segment s, FontMetrics metrics, int x,
208 return getTabbedTextWidth(null, s, metrics, x, e, startOffset, null);
219 static final int getTabbedTextWidth(View view, Segment s, FontMetrics metrics, int x,
255 nextX += metrics.charsWidth(txt, i-charCount, charCount);
262 nextX += metrics.charWidth(' ');
265 nextX += metrics.charWidth(' ') + spaceAddon;
273 nextX += metrics.charsWidth(txt, i - charCount, charCount);
279 nextX += metrics.charsWidth(txt, n - charCount, charCount);
290 * @param metrics the font metrics to use for the calculation
300 public static final int getTabbedTextOffset(Segment s, FontMetrics metrics,
303 return getTabbedTextOffset(s, metrics, x0, x, e, startOffset, true);
306 static final int getTabbedTextOffset(View view, Segment s, FontMetrics metrics,
310 return getTabbedTextOffset(view, s, metrics, x0, x, e, startOffset, true,
315 FontMetrics metrics,
319 return getTabbedTextOffset(null, s, metrics, x0, x, e, startOffset, round, null);
331 FontMetrics metrics,
379 nextX += metrics.charWidth(' ');
382 nextX += metrics.charWidth(' ') + spaceAddon;
388 nextX += metrics.charWidth(txt[i]);
396 // fractional metrics are enabled; and we must guard from this.
400 int width = metrics.charsWidth(txt, txtOffset, offset);
405 int nextWidth = offset > 1 ? metrics.charsWidth(txt, txtOffset, offset - 1) : 0;
422 while (offset > 0 && metrics.charsWidth(txt, txtOffset, offset) > (x - x0)) {
439 * @param metrics the font metrics to use for the calculation
449 public static final int getBreakLocation(Segment s, FontMetrics metrics,
455 int index = Utilities.getTabbedTextOffset(s, metrics, x0, x,