|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.editor.selection.DefaultSelectionModel
public class DefaultSelectionModel
Constructor Summary | |
---|---|
DefaultSelectionModel(CodeEditor editor)
|
Method Summary | |
---|---|
void |
addSelectionListener(SelectionListener selectionlistener)
Adds a SelectionListener to the SelectionModel to receive any selection change event. |
void |
clearSelection()
Clears the selection. |
protected void |
fireSelectionChangeEvent(int oldSelectionStart,
int oldSelectionEnd,
int newSelectionStart,
int newSelectionEnd)
|
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 offsetInDocument)
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. |
void |
setSelectionEnd(int selectionEnd)
|
void |
setSelectionStart(int selectionStart)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultSelectionModel(CodeEditor editor)
Method Detail |
---|
public int getSelectionStart()
SelectionModel
getSelectionStart
in interface SelectionModel
public int getSelectionEnd()
SelectionModel
getSelectionEnd
in interface SelectionModel
public void setSelectionStart(int selectionStart)
public void setSelectionEnd(int selectionEnd)
public int getSelectionStartLine()
SelectionModel
getSelectionStartLine
in interface SelectionModel
public int getSelectionEndLine()
SelectionModel
getSelectionEndLine
in interface SelectionModel
public CaretPosition getSelectionStartViewPosition()
SelectionModel
getSelectionStartViewPosition
in interface SelectionModel
public CaretPosition getSelectionEndViewPosition()
SelectionModel
getSelectionEndViewPosition
in interface SelectionModel
public int offsetInSelectionToOffsetInDocument(int offsetInSelection)
SelectionModel
offsetInSelectionToOffsetInDocument
in interface SelectionModel
offsetInSelection
- the offset in the selection
public int offsetInDocumentToOffsetInSelection(int offsetInDocument)
SelectionModel
offsetInDocumentToOffsetInSelection
in interface SelectionModel
offsetInDocument
- the offset in the document
public String getSelectedText()
SelectionModel
getSelectedText
in interface SelectionModel
public void setSelection(int start, int end)
SelectionModel
setSelection
in interface SelectionModel
start
- the start of the selectionend
- the end of the selectionpublic void setSelection(CaretPosition startPosition, CaretPosition endPosition)
SelectionModel
setSelection
in interface SelectionModel
startPosition
- the start of the selectionendPosition
- the end of the selectionpublic void clearSelection()
SelectionModel
clearSelection
in interface SelectionModel
public boolean hasSelection()
SelectionModel
SelectionModel
has any selection.
hasSelection
in interface SelectionModel
public boolean isColumnSelectionMode()
SelectionModel
SelectionModel
is in column selection mode, a.k.a vertical selection.
isColumnSelectionMode
in interface SelectionModel
public void setColumnSelectionMode(boolean columnSelectionMode)
SelectionModel
SelectionModel
to column selection mode.
setColumnSelectionMode
in interface SelectionModel
columnSelectionMode
- the flagpublic void addSelectionListener(SelectionListener selectionlistener)
SelectionModel
SelectionListener
to the SelectionModel
to receive any selection change event.
addSelectionListener
in interface SelectionModel
selectionlistener
- the selection listenerpublic void removeSelectionListener(SelectionListener selectionlistener)
SelectionModel
SelectionListener
from the SelectionModel
that was added before.
removeSelectionListener
in interface SelectionModel
selectionlistener
- the selection listenerpublic SelectionListener[] getSelectionListeners()
SelectionModel
SelectionListener
s added to this SelectionModel
.
getSelectionListeners
in interface SelectionModel
SelectionListener
s added to this SelectionModel
.protected void fireSelectionChangeEvent(int oldSelectionStart, int oldSelectionEnd, int newSelectionStart, int newSelectionEnd)
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |