public final class EditorSelectionColumns extends java.lang.Object implements EditorSelection
Constructor and Description |
---|
EditorSelectionColumns() |
Modifier and Type | Method and Description |
---|---|
boolean |
canSupportEditor(BasicEditorPane editorPane)
Column selection can only support editors containing fixed width fonts
|
void |
clearSelectionHighlights(HighlightLayer selectionLayer)
Clear the selection by removing any selection highlighting and permorming any other
internal clear operations.
|
void |
copy() |
void |
cut() |
void |
deinstall()
Disassociate the editor selection from an editor
|
void |
delete() |
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
|
static boolean |
isEditorFixedWidthFont(BasicEditorPane editorPane) |
boolean |
isInSelection(int offset)
Returns whether the given offset lies within the current selection bounds
|
void |
paste()
Paste in column select will delete the current selection, then beginning at the
selection start row - will insert clip board contents, one line at a time,
into the lines below the selection start row.
|
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 EditorSelection
public int getSelectionEnd()
getSelectionEnd
in interface EditorSelection
public java.lang.String getSelectedText()
getSelectedText
in interface EditorSelection
public void copy()
public void cut()
public void delete() throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void paste()
public void updateSelectionHighlight(HighlightLayer layer, HighlightStyle caretStyle)
EditorSelection
updateSelectionHighlight
in interface EditorSelection
layer
- The selection highlight layerpublic void install(BasicEditorPane editor)
EditorSelection
install
in interface EditorSelection
public void deinstall()
EditorSelection
deinstall
in interface EditorSelection
public void setStartSelectionPoint(java.awt.Point p)
EditorSelection
setStartSelectionPoint
in interface EditorSelection
p
- the Point where the selection beginpublic void setEndSelectionPoint(java.awt.Point p)
EditorSelection
setEndSelectionPoint
in interface EditorSelection
p
- the Point where the selection bounds endspublic void clearSelectionHighlights(HighlightLayer selectionLayer)
EditorSelection
clearSelectionHighlights
in interface EditorSelection
public void deleteSelection() throws javax.swing.text.BadLocationException
EditorSelection
deleteSelection
in interface EditorSelection
javax.swing.text.BadLocationException
public void insertText(int offset, java.lang.String text) throws javax.swing.text.BadLocationException
EditorSelection
insertText
in interface EditorSelection
javax.swing.text.BadLocationException
public boolean isInSelection(int offset)
EditorSelection
isInSelection
in interface EditorSelection
public void selectAll()
EditorSelection
selectAll
in interface EditorSelection
public boolean canSupportEditor(BasicEditorPane editorPane)
canSupportEditor
in interface EditorSelection
editorPane
- public static boolean isEditorFixedWidthFont(BasicEditorPane editorPane)
editorPane
-