Lines Matching refs:where
91 * @param where the starting position >= 0 && < length()
97 public UndoableEdit insertString(int where, String str) throws BadLocationException {
98 if (where >= count || where < 0) {
102 replace(where, 0, chars, 0, chars.length);
104 updateMarksForInsert(where, str.length());
106 return new InsertUndo(where, str.length());
110 * Removes part of the content. where + nitems must be < length().
112 * @param where the starting position >= 0
118 public UndoableEdit remove(int where, int nitems) throws BadLocationException {
119 if (where + nitems >= count) {
122 String removedString = getString(where, nitems);
123 UndoableEdit edit = new RemoveUndo(where, removedString);
124 replace(where, nitems, empty, 0, 0);
126 updateMarksForRemove(where, nitems);
133 * Retrieves a portion of the content. where + len must be <= length().
135 * @param where the starting position >= 0
141 public String getString(int where, int len) throws BadLocationException {
142 if (where + len > count) {
145 return new String(data, where, len);
149 * Retrieves a portion of the content. where + len must be <= length()
151 * @param where the starting position >= 0
157 public void getChars(int where, int len, Segment chars) throws BadLocationException {
158 if (where + len > count) {
162 chars.offset = where;
224 // zero is a special case where we update only