Package org.luwrain.controls.edit
Class EditCorrectors.WordWrapCorrector
java.lang.Object
org.luwrain.controls.edit.EditUtils.EmptyCorrector
org.luwrain.controls.edit.EditCorrectors.WordWrapCorrector
- 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 TypeMethodDescriptionPuts one or several characters at some position.Methods inherited from class org.luwrain.controls.edit.EditUtils.EmptyCorrector
deleteChar, deleteRegion, doEditAction, getBasicCorrector, getHotPointX, getHotPointY, getLine, getLineCount, getTabSeq, insertRegion, mergeLines, splitLine
-
Field Details
-
lineLen
protected final int lineLen
-
-
Constructor Details
-
WordWrapCorrector
-
-
Method Details
-
putChars
Description copied from interface:MultilineEdit.Model
Puts one or several characters at some position. The position expects to be valid in the content of the model, except of the case when there are no lines at all,lineIndex
equals to zero andpos
equals to zero. In this case the method must insert one empty line prior to making any required changes.After performing the operation, the method must prepare the
MultilineEdit.ModificationResult
object. If thechars
arguments has the length greater than one, the string argument of the result must be set to the value ofchars
argument.If
chars
argument has the length equals to one, this single character must be returned as the character argument of the result. If the method is requested to insert a single spacing character, the string argument of the result must contain the last word prior to the inserting position. If there is no any word prior to the inserting position, the result may have the string argument empty.- Specified by:
putChars
in interfaceMultilineEdit.Model
- Overrides:
putChars
in classEditUtils.EmptyCorrector
- Parameters:
pos
- The position on the line to put characters atlineIndex
- The index of the line to put characters onstr
- The characters to put- Returns:
- The
MultilineEdit.ModificationResult
object with the flag if the operation was performed and other corresponding information
-