|
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 |
public interface EditorSelection
An EditorSelection is a mechanism to determine the selection behaviour of an BasicEditorPane. This means determining the state of the selection (i.e. from where to where), What test is actually selected, and the shape of the selection. EditorSelections would also usually implement custom cut, copy, paste, delete, etc actions when triggered on the editor.
Method Summary | |
---|---|
boolean |
canSupportEditor(BasicEditorPane editorPane) Indicates whether the EditorSelection can support its selection type on te given editor pane |
void |
clearSelectionHighlights(HighlightLayer selectionLayer) Clear the selection by removing any selection highlighting and permorming any other internal clear operations. |
void |
deinstall() Disassociate the editor selection from an editor |
void |
deleteSelection() Remove the currently selected text (if any) from the document |
java.lang.String |
getSelectedText() |
int |
getSelectionEnd() |
int |
getSelectionStart() |
void |
insertText(int offset, java.lang.String text) Insert the given text at the given offset (Different selections will handle things like newline characters differently). |
void |
install(BasicEditorPane editor) Associate the editor selection with an editor |
boolean |
isInSelection(int offset) Returns whether the given offset lies within the current selection bounds |
void |
selectAll() Selects all characters in the document |
void |
setEndSelectionPoint(java.awt.Point p) Let the selection know the point (in editor coordinates) where the selection end is designated. |
void |
setStartSelectionPoint(java.awt.Point p) Let the selection know the point (in editor coordinates) where the selection start is designated. |
void |
updateSelectionHighlight(HighlightLayer layer, HighlightStyle caretStyle) Update the Editors selection highlight layer in response to a possible change in selection |
Method Detail |
---|
int getSelectionStart()
int getSelectionEnd()
java.lang.String getSelectedText()
void updateSelectionHighlight(HighlightLayer layer, HighlightStyle caretStyle)
layer
- The selection highlight layercaretStyle
-void install(BasicEditorPane editor)
editor
-void deinstall()
void setStartSelectionPoint(java.awt.Point p)
p
- the Point where the selection beginvoid setEndSelectionPoint(java.awt.Point p)
p
- the Point where the selection bounds endsvoid clearSelectionHighlights(HighlightLayer selectionLayer)
selectionLayer
-void deleteSelection() throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
void insertText(int offset, java.lang.String text) throws javax.swing.text.BadLocationException
offset
-text
-javax.swing.text.BadLocationException
boolean isInSelection(int offset)
offset
-void selectAll()
boolean canSupportEditor(BasicEditorPane editorPane)
editorPane
-
|
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 |