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 |
deleteSelection()
Remove the currently selected text (if any) from the document
|
Selection |
determineMoveDot(int dot,
int mark)
The caret has been asked to move the dot to the given location.
|
int |
determineSetDot(int dot)
The caret has been asked to set the dot to the given location.
|
void |
duplicate()
Duplicate the current selection.
|
int |
getDot() |
int |
getMark() |
java.lang.String |
getSelectedText() |
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 |
mouseDragged(java.awt.Point point,
int offset)
The mouse was dragged to the given point and offset
|
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 |
setDotPoint(java.awt.Point p)
Let the selection know the point (in editor coordinates) where the selection
end is designated.
|
void |
setMarkPoint(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 getMark()
getMark in interface EditorSelectionpublic int getDot()
getDot in interface EditorSelectionpublic java.lang.String getSelectedText()
getSelectedText in interface EditorSelectionpublic void copy()
public void cut()
public void deleteSelection()
throws javax.swing.text.BadLocationException
EditorSelectiondeleteSelection in interface EditorSelectionjavax.swing.text.BadLocationExceptionpublic void paste()
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 void setMarkPoint(java.awt.Point p)
EditorSelectionsetMarkPoint in interface EditorSelectionp - the Point where the selection beginpublic void setDotPoint(java.awt.Point p)
EditorSelectionsetDotPoint in interface EditorSelectionp - the Point where the selection bounds endspublic int determineSetDot(int dot)
EditorSelectiondetermineSetDot in interface EditorSelectiondot - location dot is requesting to be placed atpublic Selection determineMoveDot(int dot, int mark)
EditorSelectiondetermineMoveDot in interface EditorSelectiondot - location dot is requesting to be moved topublic void clearSelectionHighlights(HighlightLayer selectionLayer)
EditorSelectionclearSelectionHighlights in interface EditorSelectionpublic 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 - public static boolean isEditorFixedWidthFont(BasicEditorPane editorPane)
editorPane - public void mouseDragged(java.awt.Point point,
int offset)
EditorSelectionmouseDragged in interface EditorSelectionpoint - the point of the dragpublic void duplicate()
EditorSelectionduplicate in interface EditorSelection