Lines Matching refs:offset

79      * @param startOffset starting offset of the text in the document >= 0
100 * @param startOffset starting offset of the text in the document >= 0
124 int txtOffset = s.offset;
126 int flushIndex = s.offset;
132 int offset = - startOffset + txtOffset;
136 offset += parent.getStartOffset();
141 justificationData[Row.SPACE_ADDON_LEFTOVER_END] + offset;
143 justificationData[Row.START_JUSTIFIABLE] + offset;
145 justificationData[Row.END_JUSTIFIABLE] + offset;
147 int n = s.offset + s.count;
203 * @param startOffset starting offset of the text in the document >= 0
224 int txtOffset = s.offset;
225 int n = s.offset + s.count;
232 int offset = - startOffset + txtOffset;
236 offset += parent.getStartOffset();
241 justificationData[Row.SPACE_ADDON_LEFTOVER_END] + offset;
243 justificationData[Row.START_JUSTIFIABLE] + offset;
245 justificationData[Row.END_JUSTIFIABLE] + offset;
284 * Determines the relative offset into the given text that
294 * offset into the text >= 0.
297 * @param startOffset starting offset of the text in the document >= 0
298 * @return the offset into the text >= 0
344 int txtOffset = s.offset;
351 int offset = - startOffset + txtOffset;
355 offset += parent.getStartOffset();
360 justificationData[Row.SPACE_ADDON_LEFTOVER_END] + offset;
362 justificationData[Row.START_JUSTIFIABLE] + offset;
364 justificationData[Row.END_JUSTIFIABLE] + offset;
366 int n = s.offset + s.count;
367 for (int i = s.offset; i < n; i++) {
392 int offset;
398 offset = i + 1 - txtOffset;
400 int width = metrics.charsWidth(txt, txtOffset, offset);
404 while (offset > 0) {
405 int nextWidth = offset > 1 ? metrics.charsWidth(txt, txtOffset, offset - 1) : 0;
409 offset--;
416 offset--;
420 offset = i - txtOffset;
422 while (offset > 0 && metrics.charsWidth(txt, txtOffset, offset) > (x - x0)) {
423 offset--;
427 return offset;
431 // didn't find, return end offset
443 * offset into the text.
446 * @param startOffset starting offset in the document of the text
447 * @return the offset into the given text
453 int txtOffset = s.offset;
491 * @param offs the offset in the document >= 0
494 * @exception BadLocationException if the offset is out of range
521 * @param offs the offset in the document >= 0
524 * @exception BadLocationException if the offset is out of range
552 * @param offs the offset in the document >= 0
556 * @exception BadLocationException if the offset is out of range
589 * @param offs the offset in the document >= 0
593 * @exception BadLocationException if the offset is out of range
625 * @param offs the offset in the document >= 0
627 * @exception BadLocationException if the offset is out of range
643 int wordPosition = seg.offset + offs - lineStart;
648 offs = lineStart + words.previous() - seg.offset;
659 * @param offs the offset in the document >= 0
661 * @exception BadLocationException if the offset is out of range
677 int wordPosition = offs - lineStart + seg.offset;
681 offs = lineStart + words.following(wordPosition) - seg.offset;
692 * @param offs the offset in the document >= 0
694 * @exception BadLocationException if the offset is out of range
713 * the first offset is desired.
714 * Returns the offset of the next word, or BreakIterator.DONE
731 if ((first && (words.first() == (seg.offset + offs - lineStart))) &&
736 int wordPosition = words.following(seg.offset + offs - lineStart);
738 (wordPosition >= seg.offset + seg.count)) {
747 return lineStart + wordPosition - seg.offset;
755 offs = lineStart + wordPosition - seg.offset;
770 * @param offs the offset in the document >= 0
772 * @exception BadLocationException if the offset is out of range
791 * the first offset is desired.
792 * Returns the offset of the next word, or BreakIterator.DONE
809 if (words.following(seg.offset + offs - lineStart) == BreakIterator.DONE) {
813 if (wordPosition == (seg.offset + offs - lineStart)) {
826 return lineStart + wordPosition - seg.offset;
834 return lineStart + wordPosition - seg.offset;
844 * @param offs the starting offset in the document >= 0
861 static boolean isComposedTextElement(Document doc, int offset) {
864 elem = elem.getElement(elem.getElementIndex(offset));
887 * @param p0 starting offset in the composed text to be rendered
888 * @param p1 ending offset in the composed text to be rendered