Package org.luwrain.controls.edit
Class EditCorrectors.IndentationCorrector
java.lang.Object
org.luwrain.controls.edit.EditUtils.EmptyCorrector
org.luwrain.controls.edit.EditCorrectors.IndentationCorrector
- All Implemented Interfaces:
MultilineEdit.Model
,MultilineEditCorrector
,Lines
- Enclosing class:
EditCorrectors
-
Field Summary
Fields inherited from class org.luwrain.controls.edit.EditUtils.EmptyCorrector
basicCorrector
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
addIndent
(int lineIndex, int len) protected boolean
deleteIndent
(int lineIndex) protected int
getIndent
(int lineIndex) protected int
splitLine
(int pos, int lineIndex) Splits the specified line at the specified position.Methods inherited from class org.luwrain.controls.edit.EditUtils.EmptyCorrector
deleteChar, deleteRegion, doEditAction, getBasicCorrector, getHotPointX, getHotPointY, getLine, getLineCount, getTabSeq, insertRegion, mergeLines, putChars
-
Constructor Details
-
IndentationCorrector
-
-
Method Details
-
splitLine
Description copied from interface:MultilineEdit.Model
Splits the specified line at the specified position. This method removes on the line all the content after the specified position and puts the deleted fragment on new line which is inserted just after modified. If the position is given outside of the stored text, the behaviour of this method is undefined.- Specified by:
splitLine
in interfaceMultilineEdit.Model
- Overrides:
splitLine
in classEditUtils.EmptyCorrector
- Parameters:
pos
- The 0-based position to split line atlineIndex
- The 0-based index of the line to split- Returns:
- The fragment moved onto newly inserted line
-
getIndent
protected int getIndent(int lineIndex) -
deleteIndent
protected boolean deleteIndent(int lineIndex) -
addIndent
protected boolean addIndent(int lineIndex, int len) -
getTabLen
protected int getTabLen()
-