< prev index next >

src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java

Print this page

        

*** 362,372 **** p = p0 + Utilities.getBreakLocation(segment, metrics, tabBase, tabBase + currentWidth, this, p0); } else { p = p0 + Utilities.getTabbedTextOffset(segment, metrics, ! tabBase, tabBase + currentWidth, this, p0, false); } SegmentCache.releaseSharedSegment(segment); return p; } --- 362,373 ---- p = p0 + Utilities.getBreakLocation(segment, metrics, tabBase, tabBase + currentWidth, this, p0); } else { p = p0 + Utilities.getTabbedTextOffset(segment, metrics, ! (float)tabBase, ! (float)(tabBase + currentWidth), this, p0, false); } SegmentCache.releaseSharedSegment(segment); return p; }
*** 845,856 **** } else { // Determine the offset into the text Segment segment = SegmentCache.getSharedSegment(); loadText(segment, p0, p1); int n = Utilities.getTabbedTextOffset(segment, metrics, ! alloc.x, x, ! WrappedPlainView.this, p0); SegmentCache.releaseSharedSegment(segment); return Math.min(p0 + n, p1 - 1); } } } --- 846,857 ---- } else { // Determine the offset into the text Segment segment = SegmentCache.getSharedSegment(); loadText(segment, p0, p1); int n = Utilities.getTabbedTextOffset(segment, metrics, ! (float)alloc.x, (float)x, ! WrappedPlainView.this, p0, true); SegmentCache.releaseSharedSegment(segment); return Math.min(p0 + n, p1 - 1); } } }
< prev index next >