|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
javax.ide.view.DefaultViewable
javax.ide.view.View
javax.ide.editor.Editor
javax.ide.editor.TextEditor
public abstract class TextEditor
Base class for text based editors. Provides utilities for querying and changing the caret position and selection.
Field Summary |
---|
Fields inherited from interface javax.ide.view.Viewable |
---|
PROP_ICON_PATH, PROP_LABEL, PROP_VISIBLE |
Constructor Summary | |
---|---|
TextEditor() |
Method Summary | |
---|---|
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. |
Methods inherited from class javax.ide.editor.Editor |
---|
close, getContext, getLabel, open, restore, save |
Methods inherited from class javax.ide.view.View |
---|
activate, deactivate, getController, getGUI, isVisible, parent, setVisible |
Methods inherited from class javax.ide.view.DefaultViewable |
---|
addPropertyChangeListener, firePropertyChange, getIcon, getToolTip, removePropertyChangeListener, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.ide.Identifiable |
---|
getID |
Constructor Detail |
---|
public TextEditor()
Method Detail |
---|
public 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.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |