Lines Matching defs:where
90 * @param where the starting position >= 0 && < length()
96 public UndoableEdit insertString(int where, String str) throws BadLocationException {
97 if (where >= count || where < 0) {
101 replace(where, 0, chars, 0, chars.length);
103 updateMarksForInsert(where, str.length());
105 return new InsertUndo(where, str.length());
109 * Removes part of the content. where + nitems must be < length().
111 * @param where the starting position >= 0
117 public UndoableEdit remove(int where, int nitems) throws BadLocationException {
118 if (where + nitems >= count) {
121 String removedString = getString(where, nitems);
122 UndoableEdit edit = new RemoveUndo(where, removedString);
123 replace(where, nitems, empty, 0, 0);
125 updateMarksForRemove(where, nitems);
132 * Retrieves a portion of the content. where + len must be <= length().
134 * @param where the starting position >= 0
140 public String getString(int where, int len) throws BadLocationException {
141 if (where + len > count) {
144 return new String(data, where, len);
148 * Retrieves a portion of the content. where + len must be <= length()
150 * @param where the starting position >= 0
156 public void getChars(int where, int len, Segment chars) throws BadLocationException {
157 if (where + len > count) {
161 chars.offset = where;
223 // zero is a special case where we update only