Package org.luwrain.controls
Class SingleLineEdit
java.lang.Object
org.luwrain.controls.SingleLineEdit
- All Implemented Interfaces:
ClipboardTranslator.Provider,RegionTextQueryTranslator.Provider
public class SingleLineEdit
extends Object
implements ClipboardTranslator.Provider, RegionTextQueryTranslator.Provider
Implementation of editing behaviour for the line of text. This class
handles typing of characters, as well as backspace and delete keys.
It doesn't provide navigating functions, so should be used in
conjunction with some navigation handler over the text (for example,
with
NavigationArea).- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ClipboardTranslatorprotected final ControlContextprotected final SingleLineEdit.Modelprotected final AbstractRegionPointprotected final RegionTextQueryTranslator -
Constructor Summary
ConstructorsConstructorDescriptionSingleLineEdit(ControlContext context, SingleLineEdit.Model model, AbstractRegionPoint regionPoint) SingleLineEdit(SingleLineEdit.Params params) -
Method Summary
Modifier and TypeMethodDescriptionbooleanonAreaQuery(AreaQuery query) protected booleanonBackspace(InputEvent event) protected booleanonCharacter(InputEvent event) protected booleanonClear()booleanonClipboardCopy(int fromX, int fromY, int toX, int toY, boolean withDeleting) booleanprotected booleanprotected booleanonDelete(InputEvent event) booleanonDeleteRegion(int fromX, int fromY, int toX, int toY) protected booleanonHome(InputEvent event) booleanonInputEvent(InputEvent event) onRegionTextQuery(int fromX, int fromY, int toX, int toY) booleanonSystemEvent(SystemEvent event) protected booleanonTab(InputEvent event)
-
Field Details
-
context
-
model
-
regionPoint
-
regionTextQueryTranslator
-
clipboardTranslator
-
-
Constructor Details
-
SingleLineEdit
public SingleLineEdit(ControlContext context, SingleLineEdit.Model model, AbstractRegionPoint regionPoint) -
SingleLineEdit
-
-
Method Details
-
onInputEvent
-
onSystemEvent
-
onAreaQuery
-
onHome
-
onBackspace
-
onDelete
-
onTab
-
onCharacter
-
onRegionTextQuery
- Specified by:
onRegionTextQueryin interfaceRegionTextQueryTranslator.Provider
-
onClipboardCopyAll
public boolean onClipboardCopyAll()- Specified by:
onClipboardCopyAllin interfaceClipboardTranslator.Provider
-
onClipboardCopy
public boolean onClipboardCopy(int fromX, int fromY, int toX, int toY, boolean withDeleting) - Specified by:
onClipboardCopyin interfaceClipboardTranslator.Provider
-
onDeleteRegion
public boolean onDeleteRegion(int fromX, int fromY, int toX, int toY) - Specified by:
onDeleteRegionin interfaceClipboardTranslator.Provider
-
onClear
protected boolean onClear() -
onClipboardPaste
protected boolean onClipboardPaste()
-