public final class EditorSelectionWrap extends java.lang.Object implements EditorSelection, ActionHookInvoker
| Constructor and Description | 
|---|
EditorSelectionWrap()  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
canSupportEditor(BasicEditorPane editorPane)
Wrap selection is the 'standard' selection that editor panes support, 
 so this method always returns true. 
 | 
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 
 | 
void | 
duplicateSelection()
Copies the selected text amd places the copy immediately after he original
 selection. 
 | 
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 | 
invokeAction(java.lang.String actionKey)
Invokes the Action corresponding to the given actionKey. 
 | 
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 
 | 
public int getSelectionStart()
getSelectionStart in interface EditorSelectionpublic int getSelectionEnd()
getSelectionEnd in interface EditorSelectionpublic java.lang.String getSelectedText()
getSelectedText in interface EditorSelectionpublic void duplicateSelection()
public void updateSelectionHighlight(HighlightLayer layer, HighlightStyle caretStyle)
EditorSelectionupdateSelectionHighlight in interface EditorSelectionlayer - The selection highlight layerpublic void install(BasicEditorPane editor)
EditorSelectioninstall in interface EditorSelectionpublic void deinstall()
EditorSelectiondeinstall in interface EditorSelectionpublic boolean invokeAction(java.lang.String actionKey)
ActionHookInvokerinvokeAction in interface ActionHookInvokeractionKey - the published key for the actionpublic void setStartSelectionPoint(java.awt.Point p)
EditorSelectionsetStartSelectionPoint in interface EditorSelectionp - the Point where the selection beginpublic void setEndSelectionPoint(java.awt.Point p)
EditorSelectionsetEndSelectionPoint in interface EditorSelectionp - the Point where the selection bounds endspublic void clearSelectionHighlights(HighlightLayer selectionLayer)
EditorSelectionclearSelectionHighlights in interface EditorSelectionpublic void deleteSelection()
                     throws javax.swing.text.BadLocationException
EditorSelectiondeleteSelection in interface EditorSelectionjavax.swing.text.BadLocationExceptionpublic void insertText(int offset,
                       java.lang.String text)
                throws javax.swing.text.BadLocationException
EditorSelectioninsertText in interface EditorSelectionjavax.swing.text.BadLocationExceptionpublic boolean isInSelection(int offset)
EditorSelectionisInSelection in interface EditorSelectionpublic void selectAll()
EditorSelectionselectAll in interface EditorSelectionpublic boolean canSupportEditor(BasicEditorPane editorPane)
canSupportEditor in interface EditorSelectioneditorPane -