|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.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 SelectionListeners 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 SelectionModelpublic int getSelectionEnd()
SelectionModel
getSelectionEnd in interface SelectionModelpublic void setSelectionStart(int selectionStart)
public void setSelectionEnd(int selectionEnd)
public int getSelectionStartLine()
SelectionModel
getSelectionStartLine in interface SelectionModelpublic int getSelectionEndLine()
SelectionModel
getSelectionEndLine in interface SelectionModelpublic CaretPosition getSelectionStartViewPosition()
SelectionModel
getSelectionStartViewPosition in interface SelectionModelpublic CaretPosition getSelectionEndViewPosition()
SelectionModel
getSelectionEndViewPosition in interface SelectionModelpublic int offsetInSelectionToOffsetInDocument(int offsetInSelection)
SelectionModel
offsetInSelectionToOffsetInDocument in interface SelectionModeloffsetInSelection - the offset in the selection
public int offsetInDocumentToOffsetInSelection(int offsetInDocument)
SelectionModel
offsetInDocumentToOffsetInSelection in interface SelectionModeloffsetInDocument - the offset in the document
public String getSelectedText()
SelectionModel
getSelectedText in interface SelectionModel
public void setSelection(int start,
int end)
SelectionModel
setSelection in interface SelectionModelstart - the start of the selectionend - the end of the selection
public void setSelection(CaretPosition startPosition,
CaretPosition endPosition)
SelectionModel
setSelection in interface SelectionModelstartPosition - the start of the selectionendPosition - the end of the selectionpublic void clearSelection()
SelectionModel
clearSelection in interface SelectionModelpublic boolean hasSelection()
SelectionModelSelectionModel has any selection.
hasSelection in interface SelectionModelpublic boolean isColumnSelectionMode()
SelectionModelSelectionModel is in column selection mode, a.k.a vertical selection.
isColumnSelectionMode in interface SelectionModelpublic void setColumnSelectionMode(boolean columnSelectionMode)
SelectionModelSelectionModel to column selection mode.
setColumnSelectionMode in interface SelectionModelcolumnSelectionMode - the flagpublic void addSelectionListener(SelectionListener selectionlistener)
SelectionModelSelectionListener to the SelectionModel to receive any selection change event.
addSelectionListener in interface SelectionModelselectionlistener - the selection listenerpublic void removeSelectionListener(SelectionListener selectionlistener)
SelectionModelSelectionListener from the SelectionModel that was added before.
removeSelectionListener in interface SelectionModelselectionlistener - the selection listenerpublic SelectionListener[] getSelectionListeners()
SelectionModelSelectionListeners added to this SelectionModel.
getSelectionListeners in interface SelectionModelSelectionListeners 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 | ||||||||