Lines Matching refs:where
44 * to take advantage of common behavior where most changes are
121 * @param where the starting position >= 0, < length()
127 public UndoableEdit insertString(int where, String str) throws BadLocationException {
128 if (where > length() || where < 0) {
132 replace(where, 0, chars, chars.length);
133 return new InsertUndo(where, str.length());
139 * @param where the starting position >= 0, where + nitems < length()
145 public UndoableEdit remove(int where, int nitems) throws BadLocationException {
146 if (where + nitems >= length()) {
149 String removedString = getString(where, nitems);
150 UndoableEdit edit = new RemoveUndo(where, removedString);
151 replace(where, nitems, empty, 0);
159 * @param where the starting position >= 0
165 public String getString(int where, int len) throws BadLocationException {
167 getChars(where, len, s);
177 * @param where the starting position >= 0, where + len <= length()
183 public void getChars(int where, int len, Segment chars) throws BadLocationException {
184 int end = where + len;
185 if (where < 0 || end < 0) {
188 if (end > length() || where > length()) {
194 if ((where + len) <= g0) {
197 chars.offset = where;
198 } else if (where >= g0) {
201 chars.offset = g1 + where - g0;
204 int before = g0 - where;
208 chars.offset = where;
215 System.arraycopy(array, where, chars.array, 0, before);
524 * Finds the index of where to insert a new mark.
559 // didn't find it, but we indicate the index of where it would belong.