Lines Matching refs:offset

344      * the character at <code>offset</code> should be skipped when
347 boolean isNavigatable(int offset) {
361 * Returns the next editable character starting at offset incrementing
362 * the offset by <code>direction</code>.
364 private int getNextNavigatableChar(int offset, int direction) {
367 while (offset >= 0 && offset < max) {
368 if (isNavigatable(offset)) {
369 return offset;
371 offset += direction;
373 return offset;
378 * <code>deleteLength</code> characters at <code>offset</code>
379 * and inserting <code>replaceString</code> at <code>offset</code>
382 String getReplaceString(int offset, int deleteLength,
387 result = string.substring(0, offset);
391 if (offset + deleteLength < string.length()) {
392 result += string.substring(offset + deleteLength);
404 String newString = getReplaceString(rh.offset, rh.length, rh.text);
460 * Returns the next cursor position from offset by incrementing
465 int getNextCursorPosition(int offset, int direction) {
466 int newOffset = getNextNavigatableChar(offset, direction);
470 if (direction == -1 && offset == newOffset) {
472 // offset are fixed.
475 newOffset = offset;
492 void repositionCursor(int offset, int direction) {
494 (offset, direction));
547 void replace(DocumentFilter.FilterBypass fb, int offset,
550 ReplaceHolder rh = getReplaceHolder(fb, offset, length, text, attrs);
570 (getFormattedTextField().getSelectionStart() != rh.offset ||
579 rh.fb.getDocument().getLength() - rh.offset);
589 rh.fb.replace(rh.offset, rh.length, rh.text, rh.attrs);
591 cursor = rh.offset;
593 cursor = rh.offset + rh.text.length();
628 ReplaceHolder getReplaceHolder(DocumentFilter.FilterBypass fb, int offset,
634 replaceHolder.reset(fb, offset, length, text, attrs);
647 int offset;
658 * the replace (-1: offset, 1: offset + text.length()), otherwise
663 void reset(DocumentFilter.FilterBypass fb, int offset, int length,
666 this.offset = offset;
725 public void remove(FilterBypass fb, int offset, int length) throws
730 fb.remove(offset, length);
732 DefaultFormatter.this.replace(fb, offset, length, null, null);
736 public void insertString(FilterBypass fb, int offset,
743 fb.insertString(offset, string, attr);
745 DefaultFormatter.this.replace(fb, offset, 0, string, attr);
749 public void replace(FilterBypass fb, int offset, int length,
756 fb.replace(offset, length, text, attr);
758 DefaultFormatter.this.replace(fb, offset, length, text, attr);