|
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.caret.DefaultCaretModel
public class DefaultCaretModel
The default implementation of CaretModel.
| Constructor Summary | |
|---|---|
DefaultCaretModel(CodeEditor editor)
|
|
| Method Summary | |
|---|---|
void |
addCaretListener(CaretListener caretlistener)
Adds caret listener to listen to any changes in the caret position. |
protected void |
fireCaretEvent(int type,
CaretPosition oldPosition,
CaretPosition newPosition)
|
CaretListener[] |
getCaretListeners()
Gets the CaretListeners register on DefaultCaretModel. |
CaretPosition |
getModelPosition()
Gets the caret model position. |
int |
getOffset()
Gets the offset. |
CaretPosition |
getViewPosition()
Gets the caret view position. |
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 p)
Sets the caret model position. |
void |
setOffset(int offset)
Sets the offset. |
void |
setViewPosition(CaretPosition vp)
Sets the caret view position. |
void |
updateViewPosition()
Updates the caret view position from caret model position. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultCaretModel(CodeEditor editor)
| Method Detail |
|---|
public CaretPosition getModelPosition()
getModelPosition in interface CaretModelpublic void setModelPosition(CaretPosition p)
setModelPosition in interface CaretModelp - the caret model position.public CaretPosition getViewPosition()
getViewPosition in interface CaretModelpublic void setViewPosition(CaretPosition vp)
setViewPosition in interface CaretModelvp - the caret view position.public void setOffset(int offset)
setOffset in interface CaretModeloffset - the offset in the Documentpublic int getOffset()
getOffset in interface CaretModelpublic void addCaretListener(CaretListener caretlistener)
CaretModel
addCaretListener in interface CaretModelcaretlistener - a CaretListener to be added.public void removeCaretListener(CaretListener caretlistener)
CaretModel
removeCaretListener in interface CaretModelcaretlistener - the CaretListener to be removed.public CaretListener[] getCaretListeners()
getCaretListeners in interface CaretModel
protected void fireCaretEvent(int type,
CaretPosition oldPosition,
CaretPosition newPosition)
public void moveCaret(int xOffset,
int yOffset,
boolean select,
boolean columnSelection,
boolean scrollVisible)
moveCaret in interface CaretModelxOffset - 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.public void updateViewPosition()
updateViewPosition in interface CaretModel
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||