|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CaretModel
The model class for the caret position. There are three types of information in this model.
Method Summary | |
---|---|
void |
addCaretListener(CaretListener caretListener)
Adds caret listener to listen to any changes in the caret position. |
CaretListener[] |
getCaretListeners()
Returns an array of all the CaretListener s added to this CaretModel with addCaretListener(). |
CaretPosition |
getModelPosition()
Gets the caret model position as in the document. |
int |
getOffset()
Gets the caret offset as in the document. |
CaretPosition |
getViewPosition()
Gets the caret caret view position as in the view. |
void |
moveCaret(int xOffset,
int yOffset,
boolean select,
boolean columnSelection,
boolean scrollVisible)
Moves caret from its current position to another position using the x and y offset. |
void |
removeCaretListener(CaretListener caretListener)
Removes caret listener that is added before. |
void |
setModelPosition(CaretPosition position)
Sets the caret model position. |
void |
setOffset(int offset)
Sets the caret offset. |
void |
setViewPosition(CaretPosition caretPosition)
Sets the caret view position.This method will update the caret offset and the caret model position. |
void |
updateViewPosition()
Updates the caret view position when folding changes. |
Method Detail |
---|
void setOffset(int offset)
offset
- the new caret offset.int getOffset()
void setModelPosition(CaretPosition position)
position
- the caret position.CaretPosition getModelPosition()
void setViewPosition(CaretPosition caretPosition)
caretPosition
- a new caret view position.CaretPosition getViewPosition()
void moveCaret(int xOffset, int yOffset, boolean select, boolean columnSelection, boolean scrollVisible)
xOffset
- the x offset from its current caret model position. For example, if you move one char
left, the xOffset will be -1.yOffset
- the y offset from its current caret model position. For example, if you move one line up,
the yOffset will be -1.select
- whether to select from its current caret model position to the new position.columnSelection
- whether the selection is in column selection mode.scrollVisible
- whether scroll to the caret at its new position.void addCaretListener(CaretListener caretListener)
caretListener
- a CaretListener to be added.void removeCaretListener(CaretListener caretListener)
caretListener
- the CaretListener to be removed.CaretListener[] getCaretListeners()
CaretListener
s added to this CaretModel with addCaretListener().
CaretListener
s added or an empty array if no listeners have been addedvoid updateViewPosition()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |