public abstract class TextEditor extends Editor
PROP_ICON_PATH, PROP_LABEL, PROP_VISIBLE| Constructor and Description |
|---|
TextEditor() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
getCaretColumn()
Get the current column position of the caret.
|
abstract int |
getCaretLine()
Get the current line position of the caret.
|
abstract int |
getCaretPosition()
Get the current caret position as a character offset from the start of the
document.
|
abstract int |
getSelectionLength()
Get the length of the current selection in characters.
|
abstract int |
getSelectionStart()
Get the character offset of the start of the current selection.
|
abstract void |
setCaretPosition(int position)
Set the caret position.
|
abstract void |
setCaretPosition(int line,
int column)
Set the caret position using a line and column number.
|
abstract void |
setSelection(int start,
int length)
Set the current selection.
|
close, getContext, getLabel, open, restore, saveactivate, deactivate, getController, getGUI, isVisible, parent, setVisibleaddPropertyChangeListener, firePropertyChange, getIcon, getToolTip, removePropertyChangeListener, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIDpublic abstract int getCaretPosition()
public abstract void setCaretPosition(int position)
position - the character offset from the start of the document at
which to position the caret.java.lang.IndexOutOfBoundsException - if the specified position
is invalid.public abstract void setCaretPosition(int line,
int column)
line - the line number on which to position the caret. The first line
in the document is 0.column - the column number at which to position the caret. The first
column in the document is 0.java.lang.IndexOutOfBoundsException - if the specified position is
invalid.public abstract int getCaretColumn()
public abstract int getCaretLine()
public abstract int getSelectionStart()
getCaretPosition().public abstract int getSelectionLength()
public abstract void setSelection(int start,
int length)
start - the start offset of the selection. This must be greater than
0 and less than the length of the document-1.length - the length of the selection. This must not cause the
selection to extend past the end of the document.java.lang.IndexOutOfBoundsException - if the specified selection
position is invalid.