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, wait
addSelectionListener, getLeadSelectionOffset, getLeadSelectionPosition, getSelectedText, getSelectedText, getSelectionEnd, getSelectionEndPosition, getSelectionStart, getSelectionStartPosition, hasSelection, hasSelection, removeSelection, removeSelection, selectLineAtCaret, selectWordAtCaret, setSelection, setSelection, setSelection
public SelectionModelImpl(EditorImpl editor)
public boolean isUnknownDirection()
CaretImpl.setUnknownDirection(boolean)
public void setUnknownDirection(boolean unknownDirection)
CaretImpl.setUnknownDirection(boolean)
public Editor getEditor()
getEditor
in interface SelectionModel
public void setBlockSelection(LogicalPosition blockStart, LogicalPosition blockEnd)
SelectionModel
setBlockSelection
in interface SelectionModel
blockStart
- the start of the rectangle to select.blockEnd
- the end of the rectangle to select.SelectionModel.setSelection(int, int)
public int [] getBlockSelectionStarts()
SelectionModel
getBlockSelectionStarts
in interface SelectionModel
public int [] getBlockSelectionEnds()
SelectionModel
getBlockSelectionEnds
in interface SelectionModel
public void addSelectionListener(SelectionListener listener)
SelectionModel
addSelectionListener
in interface SelectionModel
listener
- the listener instance.public void removeSelectionListener(SelectionListener listener)
SelectionModel
removeSelectionListener
in interface SelectionModel
listener
- the listener instance.public static void doSelectLineAtCaret(Caret caret)
public void copySelectionToClipboard()
SelectionModel
copySelectionToClipboard
in interface SelectionModel
public TextAttributes getTextAttributes()
SelectionModel
getTextAttributes
in interface SelectionModel
public void reinitSettings()