< prev index next >
src/java.desktop/share/classes/javax/swing/text/GlyphPainter1.java
Print this page
*** 57,67 ****
public float getSpan(GlyphView v, int p0, int p1,
TabExpander e, float x) {
sync(v);
Segment text = v.getText(p0, p1);
int[] justificationData = getJustificationData(v);
! int width = Utilities.getTabbedTextWidth(v, text, metrics, (int) x, e, p0,
justificationData);
SegmentCache.releaseSharedSegment(text);
return width;
}
--- 57,71 ----
public float getSpan(GlyphView v, int p0, int p1,
TabExpander e, float x) {
sync(v);
Segment text = v.getText(p0, p1);
int[] justificationData = getJustificationData(v);
!
! Component comp = v.getContainer();
! FontMetrics metrics1 = comp.getFontMetrics(comp.getFont());
!
! float width = Utilities.getTabbedTextWidth(v, text, metrics1, x, e, p0,
justificationData);
SegmentCache.releaseSharedSegment(text);
return width;
}
< prev index next >