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
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ClipboardTranslator
protected final ControlContext
protected final SingleLineEdit.Model
protected final AbstractRegionPoint
protected final RegionTextQueryTranslator
-
Constructor Summary
ConstructorDescriptionSingleLineEdit
(ControlContext context, SingleLineEdit.Model model, AbstractRegionPoint regionPoint) -
Method Summary
Modifier and TypeMethodDescriptionboolean
onAreaQuery
(AreaQuery query) protected boolean
onBackspace
(InputEvent event) protected boolean
onCharacter
(InputEvent event) protected boolean
onClear()
boolean
onClipboardCopy
(int fromX, int fromY, int toX, int toY, boolean withDeleting) boolean
protected boolean
protected boolean
onDelete
(InputEvent event) boolean
onDeleteRegion
(int fromX, int fromY, int toX, int toY) protected boolean
onHome
(InputEvent event) boolean
onInputEvent
(InputEvent event) onRegionTextQuery
(int fromX, int fromY, int toX, int toY) boolean
onSystemEvent
(SystemEvent event) protected boolean
onTab
(InputEvent event)
-
Field Details
-
context
-
model
-
regionPoint
-
regionTextQueryTranslator
-
clipboardTranslator
-
-
Constructor Details
-
SingleLineEdit
public SingleLineEdit(ControlContext context, SingleLineEdit.Model model, AbstractRegionPoint regionPoint)
-
-
Method Details
-
onInputEvent
-
onSystemEvent
-
onAreaQuery
-
onHome
-
onBackspace
-
onDelete
-
onTab
-
onCharacter
-
onRegionTextQuery
- Specified by:
onRegionTextQuery
in interfaceRegionTextQueryTranslator.Provider
-
onClipboardCopyAll
public boolean onClipboardCopyAll()- Specified by:
onClipboardCopyAll
in interfaceClipboardTranslator.Provider
-
onClipboardCopy
public boolean onClipboardCopy(int fromX, int fromY, int toX, int toY, boolean withDeleting) - Specified by:
onClipboardCopy
in interfaceClipboardTranslator.Provider
-
onDeleteRegion
public boolean onDeleteRegion(int fromX, int fromY, int toX, int toY) - Specified by:
onDeleteRegion
in interfaceClipboardTranslator.Provider
-
onClear
protected boolean onClear() -
onClipboardPaste
protected boolean onClipboardPaste()
-