public class SelectionModelImpl extends java.lang.Object implements SelectionModel
| Constructor and Description |
|---|
SelectionModelImpl(EditorImpl editor) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSelectionListener(SelectionListener listener)
Adds a listener for receiving information about selection changes.
|
void |
copySelectionToClipboard()
Copies the currently selected text to the clipboard.
|
static void |
doSelectLineAtCaret(Caret caret) |
int [] |
getBlockSelectionEnds()
Returns an array of end offsets in the document for ranges selected in the document currently.
|
int [] |
getBlockSelectionStarts()
Returns an array of start offsets in the document for ranges selected in the document currently.
|
Editor |
getEditor() |
TextAttributes |
getTextAttributes()
Returns visual representation of selection.
|
boolean |
isUnknownDirection() |
void |
reinitSettings() |
void |
removeSelectionListener(SelectionListener listener)
Removes a listener for receiving information about selection changes.
|
void |
setBlockSelection(LogicalPosition blockStart,
LogicalPosition blockEnd)
Creates a multi-caret selection for the rectangular block of text with specified start and end positions.
|
void |
setUnknownDirection(boolean unknownDirection) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSelectionListener, getLeadSelectionOffset, getLeadSelectionPosition, getSelectedText, getSelectedText, getSelectionEnd, getSelectionEndPosition, getSelectionStart, getSelectionStartPosition, hasSelection, hasSelection, removeSelection, removeSelection, selectLineAtCaret, selectWordAtCaret, setSelection, setSelection, setSelectionpublic SelectionModelImpl(EditorImpl editor)
public boolean isUnknownDirection()
CaretImpl.setUnknownDirection(boolean)public void setUnknownDirection(boolean unknownDirection)
CaretImpl.setUnknownDirection(boolean)public Editor getEditor()
getEditor in interface SelectionModelpublic void setBlockSelection(LogicalPosition blockStart, LogicalPosition blockEnd)
SelectionModelsetBlockSelection in interface SelectionModelblockStart - the start of the rectangle to select.blockEnd - the end of the rectangle to select.SelectionModel.setSelection(int, int)public int [] getBlockSelectionStarts()
SelectionModelgetBlockSelectionStarts in interface SelectionModelpublic int [] getBlockSelectionEnds()
SelectionModelgetBlockSelectionEnds in interface SelectionModelpublic void addSelectionListener(SelectionListener listener)
SelectionModeladdSelectionListener in interface SelectionModellistener - the listener instance.public void removeSelectionListener(SelectionListener listener)
SelectionModelremoveSelectionListener in interface SelectionModellistener - the listener instance.public static void doSelectLineAtCaret(Caret caret)
public void copySelectionToClipboard()
SelectionModelcopySelectionToClipboard in interface SelectionModelpublic TextAttributes getTextAttributes()
SelectionModelgetTextAttributes in interface SelectionModelpublic void reinitSettings()