|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SelectionModel
An interface to represent the selection in CodeEditor.
Method Summary | |
---|---|
void |
addSelectionListener(SelectionListener selectionListener)
Adds a SelectionListener to the SelectionModel to receive any selection change event. |
void |
clearSelection()
Clears the selection. |
String |
getSelectedText()
Gets the selected text. |
int |
getSelectionEnd()
Gets the offset of the selection end. |
int |
getSelectionEndLine()
Gets the line number of the selection end. |
CaretPosition |
getSelectionEndViewPosition()
Gets the view position of the selection end. |
SelectionListener[] |
getSelectionListeners()
Gets all the SelectionListener s added to this SelectionModel . |
int |
getSelectionStart()
Gets the offset of the selection start. |
int |
getSelectionStartLine()
Gets the line number of the selection start. |
CaretPosition |
getSelectionStartViewPosition()
Gets the view position of the selection start. |
boolean |
hasSelection()
Checks if the SelectionModel has any selection. |
boolean |
isColumnSelectionMode()
Checks if the SelectionModel is in column selection mode, a.k.a vertical selection. |
int |
offsetInDocumentToOffsetInSelection(int offsetInSDocument)
Gets the offset in the selection based on the offset in the document. |
int |
offsetInSelectionToOffsetInDocument(int offsetInSelection)
Gets the offset in the document based on the offset in the selection. |
void |
removeSelectionListener(SelectionListener selectionListener)
Removes the SelectionListener from the SelectionModel that was added before. |
void |
setColumnSelectionMode(boolean columnSelectionMode)
Sets the SelectionModel to column selection mode. |
void |
setSelection(CaretPosition startPosition,
CaretPosition endPosition)
Sets the selection. |
void |
setSelection(int start,
int end)
Sets the selection. |
Method Detail |
---|
int getSelectionStart()
int getSelectionEnd()
CaretPosition getSelectionStartViewPosition()
CaretPosition getSelectionEndViewPosition()
int getSelectionStartLine()
int getSelectionEndLine()
String getSelectedText()
void setSelection(int start, int end)
start
- the start of the selectionend
- the end of the selectionvoid setSelection(CaretPosition startPosition, CaretPosition endPosition)
startPosition
- the start of the selectionendPosition
- the end of the selectionint offsetInSelectionToOffsetInDocument(int offsetInSelection)
offsetInSelection
- the offset in the selection
int offsetInDocumentToOffsetInSelection(int offsetInSDocument)
offsetInSDocument
- the offset in the document
void clearSelection()
boolean hasSelection()
SelectionModel
has any selection.
boolean isColumnSelectionMode()
SelectionModel
is in column selection mode, a.k.a vertical selection.
void setColumnSelectionMode(boolean columnSelectionMode)
SelectionModel
to column selection mode.
columnSelectionMode
- the flagvoid addSelectionListener(SelectionListener selectionListener)
SelectionListener
to the SelectionModel
to receive any selection change event.
selectionListener
- the selection listenervoid removeSelectionListener(SelectionListener selectionListener)
SelectionListener
from the SelectionModel
that was added before.
selectionListener
- the selection listenerSelectionListener[] getSelectionListeners()
SelectionListener
s added to this SelectionModel
.
SelectionListener
s added to this SelectionModel
.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |