Package org.luwrain.popups
Class SimpleEditPopup
java.lang.Object
org.luwrain.popups.SimpleEditPopup
- All Implemented Interfaces:
ClipboardTranslator.Provider
,EmbeddedEditLines
,RegionTextQueryTranslator.Provider
,Area
,HotPoint
,HotPointControl
,Lines
,Popup
,PopupClosingTranslator.Provider
- Direct Known Subclasses:
EditListPopup
public class SimpleEditPopup
extends Object
implements Popup, PopupClosingTranslator.Provider, HotPointControl, EmbeddedEditLines, ClipboardTranslator.Provider, RegionTextQueryTranslator.Provider
Shows a popup for input of single line of text. This class is an
implementation of
Popup
interface with
functionality to let user to give single line of text without any
completion and helping features. This class takes a short line which
will be shown before the input describing the purpose of expected
value. As well, this class takes acceptance object which prevents
input of undesirable values.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.luwrain.core.Popup
Popup.Flags, Popup.Position
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ClipboardTranslator
protected final PopupClosingTranslator
protected final EmbeddedEdit
protected final Luwrain
protected final String
protected final Set<Popup.Flags>
protected int
protected final String
protected final RegionPoint
protected final RegionTextQueryTranslator
protected String
-
Constructor Summary
ConstructorDescriptionSimpleEditPopup
(Luwrain luwrain, String name, String prefix, String text, Set<Popup.Flags> popupFlags) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Action[]
getEmbeddedEditLine
(int editPosX, int editPosY) int
int
getLine
(int index) int
protected String
getSpeakableText
(String prefix, String text) protected String
protected String
boolean
protected boolean
onAltLeft
(InputEvent event) protected boolean
onAltRight
(InputEvent event) boolean
onAreaQuery
(AreaQuery query) boolean
onCancel()
boolean
onClipboardCopy
(int fromX, int fromY, int toX, int toY, boolean withDeleting) boolean
boolean
onDeleteRegion
(int fromX, int fromY, int toX, int toY) protected boolean
onEnd
(InputEvent event) protected boolean
onHome
(InputEvent event) boolean
onInputEvent
(InputEvent event) protected boolean
onMoveLeft
(InputEvent event) protected boolean
onMoveRight
(InputEvent event) boolean
onOk()
onRegionTextQuery
(int fromX, int fromY, int toX, int toY) boolean
onSystemEvent
(SystemEvent event) void
setEmbeddedEditLine
(int editPosX, int editPosY, String value) void
setHotPointX
(int value) void
setHotPointY
(int value) protected void
text()
boolean
-
Field Details
-
luwrain
-
closing
-
regionPoint
-
clipboardTranslator
-
regionTextQueryTranslator
-
edit
-
name
-
prefix
-
text
-
pos
protected int pos -
popupFlags
-
-
Constructor Details
-
SimpleEditPopup
-
-
Method Details
-
getLineCount
public int getLineCount()- Specified by:
getLineCount
in interfaceLines
-
getLine
-
getHotPointX
public int getHotPointX()- Specified by:
getHotPointX
in interfaceArea
- Specified by:
getHotPointX
in interfaceHotPoint
- Specified by:
getHotPointX
in interfaceHotPointControl
-
getHotPointY
public int getHotPointY()- Specified by:
getHotPointY
in interfaceArea
- Specified by:
getHotPointY
in interfaceHotPoint
- Specified by:
getHotPointY
in interfaceHotPointControl
-
getSpeakableText
-
onInputEvent
- Specified by:
onInputEvent
in interfaceArea
-
onSystemEvent
- Specified by:
onSystemEvent
in interfaceArea
-
onAreaQuery
- Specified by:
onAreaQuery
in interfaceArea
-
getAreaActions
- Specified by:
getAreaActions
in interfaceArea
-
getAreaName
- Specified by:
getAreaName
in interfaceArea
-
text
-
onMoveLeft
-
onMoveRight
-
onHome
-
onEnd
-
onAltRight
-
onAltLeft
-
getEmbeddedEditLine
- Specified by:
getEmbeddedEditLine
in interfaceEmbeddedEditLines
-
setEmbeddedEditLine
- Specified by:
setEmbeddedEditLine
in interfaceEmbeddedEditLines
-
setHotPointX
public void setHotPointX(int value) - Specified by:
setHotPointX
in interfaceHotPointControl
-
setHotPointY
public void setHotPointY(int value) - Specified by:
setHotPointY
in interfaceHotPointControl
-
beginHotPointTrans
public void beginHotPointTrans()- Specified by:
beginHotPointTrans
in interfaceHotPointControl
-
endHotPointTrans
public void endHotPointTrans()- Specified by:
endHotPointTrans
in interfaceHotPointControl
-
onOk
public boolean onOk()- Specified by:
onOk
in interfacePopupClosingTranslator.Provider
-
onCancel
public boolean onCancel()- Specified by:
onCancel
in interfacePopupClosingTranslator.Provider
-
getTextBeforeHotPoint
-
getTextAfterHotPoint
-
setText
-
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
-
getLuwrainObject
- Specified by:
getLuwrainObject
in interfacePopup
-
isPopupActive
public boolean isPopupActive()- Specified by:
isPopupActive
in interfacePopup
-
getPopupFlags
- Specified by:
getPopupFlags
in interfacePopup
-
wasCancelled
public boolean wasCancelled()
-