Lines Matching refs:beginIndex

194      * @param beginIndex Index of the first character of the range.
199 * beginIndex and endIndex is out of the text range.
203 int beginIndex,
205 this(text, beginIndex, endIndex, null);
219 * @param beginIndex Index of the first character of the range.
227 * beginIndex and endIndex is out of the text range.
231 int beginIndex,
241 if (beginIndex < textBeginIndex || endIndex > textEndIndex || beginIndex > endIndex)
246 text.setIndex(beginIndex);
251 if (beginIndex == endIndex)
280 if (start >= beginIndex && limit <= endIndex) {
281 addAttribute(attributeKey, value, start - beginIndex, limit - beginIndex);
291 if (limit > beginIndex) {
293 if (start < beginIndex)
294 start = beginIndex;
298 addAttribute(attributeKey, value, start - beginIndex, limit - beginIndex);
334 * @param beginIndex Index of the first character of the range.
337 * @exception IllegalArgumentException if beginIndex is less then 0, endIndex is
338 * greater than the length of the string, or beginIndex and endIndex together don't
342 int beginIndex, int endIndex) {
348 if (beginIndex < 0 || endIndex > length() || beginIndex >= endIndex) {
352 addAttributeImpl(attribute, value, beginIndex, endIndex);
358 * @param beginIndex Index of the first character of the range.
362 * @exception IllegalArgumentException if beginIndex is less then
364 * beginIndex and endIndex together don't define a non-empty
369 int beginIndex, int endIndex)
375 if (beginIndex < 0 || endIndex > length() || beginIndex > endIndex) {
378 if (beginIndex == endIndex) {
390 int beginRunIndex = ensureRunBreak(beginIndex);
401 int beginIndex, int endIndex) {
409 int beginRunIndex = ensureRunBreak(beginIndex);
575 * @param beginIndex the index of the first character
578 * @exception IllegalArgumentException if beginIndex is less then 0,
579 * endIndex is greater than the length of the string, or beginIndex is
582 public AttributedCharacterIterator getIterator(Attribute[] attributes, int beginIndex, int endIndex) {
583 return new AttributedStringIterator(attributes, beginIndex, endIndex);
614 // gets an attribute value, but returns an annotation only if it's range does not extend outside the range beginIndex..endIndex
615 private Object getAttributeCheckRange(Attribute attribute, int runIndex, int beginIndex, int endIndex) {
619 if (beginIndex > 0) {
622 while (runStart >= beginIndex &&
627 if (runStart < beginIndex) {
737 private int beginIndex;
744 // invariant: beginIndex <= currentIndex <= endIndex
753 AttributedStringIterator(Attribute[] attributes, int beginIndex, int endIndex) {
755 if (beginIndex < 0 || beginIndex > endIndex || endIndex > length()) {
759 this.beginIndex = beginIndex;
761 this.currentIndex = beginIndex;
782 if (currentIndex != that.currentIndex || beginIndex != that.beginIndex || endIndex != that.endIndex)
788 return text.hashCode() ^ currentIndex ^ beginIndex ^ endIndex;
804 return internalSetIndex(beginIndex);
808 if (endIndex == beginIndex) {
833 if (currentIndex > beginIndex) {
842 if (position < beginIndex || position > endIndex)
848 return beginIndex;
866 if (currentRunStart == beginIndex || currentRunIndex == -1) {
872 while (runStart > beginIndex &&
877 if (runStart < beginIndex) {
878 runStart = beginIndex;
885 if (currentRunStart == beginIndex || currentRunIndex == -1) {
890 while (runStart > beginIndex &&
895 if (runStart < beginIndex) {
896 runStart = beginIndex;
949 return new AttributeMap(currentRunIndex, beginIndex, endIndex);
965 if (runStarts[i] < endIndex && (i == runCount - 1 || runStarts[i + 1] > beginIndex)) {
985 return AttributedString.this.getAttributeCheckRange(attribute, runIndex, beginIndex, endIndex);
1021 if (currentRunStart < beginIndex)
1022 currentRunStart = beginIndex;
1025 currentRunStart = beginIndex;
1046 int beginIndex;
1049 AttributeMap(int runIndex, int beginIndex, int endIndex) {
1051 this.beginIndex = beginIndex;
1064 runIndex, beginIndex, endIndex);
1077 return AttributedString.this.getAttributeCheckRange((Attribute) key, runIndex, beginIndex, endIndex);