Lines Matching defs:start

29                                           int start, int end) {
30 if (start == 0 && end == source.length())
33 mText = source.toString().substring(start, end);
40 copySpans((SpannableStringInternal) source, start, end);
42 copySpans((Spanned) source, start, end);
48 * Copies another {@link Spanned} object's spans between [start, end] into this object.
51 * @param start Start index in the source object.
54 private final void copySpans(Spanned src, int start, int end) {
55 Object[] spans = src.getSpans(start, end, Object.class);
62 if (st < start)
63 st = start;
67 setSpan(spans[i], st - start, en - start, fl);
72 * Copies a {@link SpannableStringInternal} object's spans between [start, end] into this
76 * @param start Start index in the source object.
79 private final void copySpans(SpannableStringInternal src, int start, int end) {
80 if (start == 0 && end == src.length()) {
93 if (isOutOfCopyRange(start, end, spanStart, spanEnd)) continue;
106 if (isOutOfCopyRange(start, end, spanStart, spanEnd)) continue;
107 if (spanStart < start) spanStart = start;
111 mSpanData[j * COLUMNS + START] = spanStart - start;
112 mSpanData[j * COLUMNS + END] = spanEnd - start;
120 * Checks if [spanStart, spanEnd] interval is excluded from [start, end].
124 private final boolean isOutOfCopyRange(int start, int end, int spanStart, int spanEnd) {
125 if (spanStart > end || spanEnd < start) return true;
126 if (spanStart != spanEnd && start != end) {
127 if (spanStart == end || spanEnd == start) return true;
146 public final void getChars(int start, int end, char[] dest, int off) {
147 mText.getChars(start, end, dest, off);
150 /* package */ void setSpan(Object what, int start, int end, int flags) {
151 int nstart = start;
154 checkRange("setSpan", start, end);
157 if (start != 0 && start != length()) {
158 char c = charAt(start - 1);
162 "PARAGRAPH span must start at paragraph boundary" +
163 " (" + start + " follows " + c + ")");
185 data[i * COLUMNS + START] = start;
207 mSpanData[mSpanCount * COLUMNS + START] = start;
363 public int nextSpanTransition(int start, int limit, Class kind) {
376 if (st > start && st < limit && kind.isInstance(spans[i]))
378 if (en > start && en < limit && kind.isInstance(spans[i]))
385 private void sendSpanAdded(Object what, int start, int end) {
386 SpanWatcher[] recip = getSpans(start, end, SpanWatcher.class);
390 recip[i].onSpanAdded((Spannable) this, what, start, end);
394 private void sendSpanRemoved(Object what, int start, int end) {
395 SpanWatcher[] recip = getSpans(start, end, SpanWatcher.class);
399 recip[i].onSpanRemoved((Spannable) this, what, start, end);
413 private static String region(int start, int end) {
414 return "(" + start + " ... " + end + ")";
417 private void checkRange(final String operation, int start, int end) {
418 if (end < start) {
420 region(start, end) +
421 " has end before start");
426 if (start > len || end > len) {
428 region(start, end) +
432 if (start < 0 || end < 0) {
434 region(start, end) +