Package app.ui.overlayactions
Class OverlayTextInputAction
java.lang.Object
app.ui.windows.Window
app.ui.windows.WindowOverlayClass
app.ui.overlayactions.OverlayTextInputAction
- Direct Known Subclasses:
OverlayTextInputActionToggles
The
OverlayTextInputAction class represents an overlay window for receiving text input with options to enter or cancel.
It extends the WindowOverlayClass and implements the ICallBack interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIndicates whether the text input is aborted.protected WidgetButtonThe button to abort the text input.protected WidgetButtonThe button to exit the text input.protected WidgetTextBoxThe text input box.Fields inherited from class app.ui.windows.WindowOverlayClass
offsetX, offsetYFields inherited from class app.ui.windows.Window
backColor, buffer, overlays, printColor, switchToWindow, widgets -
Constructor Summary
ConstructorsConstructorDescriptionOverlayTextInputAction(int x, int offsetY, int offsetX, String windowName, String prompt, Window callbackWindow) Constructs an instance ofOverlayTextInputAction.OverlayTextInputAction(int x, int offsetY, int offsetX, String windowName, String prompt, Window callbackWindow, int returnCode) Constructs an instance ofOverlayTextInputActionwith a specified return code.OverlayTextInputAction(int x, int offsetY, int offsetX, String windowName, String prompt, Window callbackWindow, String loadText) Constructs an instance ofOverlayTextInputActionwith a specified pre-loaded text. -
Method Summary
Modifier and TypeMethodDescriptionvoidHandles the message loop for the overlay window.voidonExit()Performs actions upon exiting the overlay window.Methods inherited from class app.ui.windows.WindowOverlayClass
clearArea, clearOuterArea, draw, getDestroy, setDestroyMethods inherited from class app.ui.windows.Window
addOverlay, addWidget, addWidgetAfter, clearArea, getLenX, getLenY, getSwitchToWindow, getWidgetIndex, getX, getY, keyStroke, keyStrokeHelper, messageLoopHelper, removeWidget, selectNext, selectPrev, setClear, setPointer, setY, switchFrom
-
Field Details
-
exitButton
The button to exit the text input. -
abordButton
The button to abort the text input. -
textInput
The text input box. -
abord
protected boolean abordIndicates whether the text input is aborted.
-
-
Constructor Details
-
OverlayTextInputAction
public OverlayTextInputAction(int x, int offsetY, int offsetX, String windowName, String prompt, Window callbackWindow) Constructs an instance ofOverlayTextInputAction.- Parameters:
x- The x-coordinate of the window.offsetY- The y-coordinate offset of the window.offsetX- The x-coordinate offset of the window.windowName- The name of the window.prompt- The prompt message for text input.callbackWindow- The callback window to notify upon completion.
-
OverlayTextInputAction
public OverlayTextInputAction(int x, int offsetY, int offsetX, String windowName, String prompt, Window callbackWindow, int returnCode) Constructs an instance ofOverlayTextInputActionwith a specified return code.- Parameters:
x- The x-coordinate of the window.offsetY- The y-coordinate offset of the window.offsetX- The x-coordinate offset of the window.windowName- The name of the window.prompt- The prompt message for text input.callbackWindow- The callback window to notify upon completion.returnCode- The return code to be passed to the callback window.
-
OverlayTextInputAction
public OverlayTextInputAction(int x, int offsetY, int offsetX, String windowName, String prompt, Window callbackWindow, String loadText) Constructs an instance ofOverlayTextInputActionwith a specified pre-loaded text.- Parameters:
x- The x-coordinate of the window.offsetY- The y-coordinate offset of the window.offsetX- The x-coordinate offset of the window.windowName- The name of the window.prompt- The prompt message for text input.callbackWindow- The callback window to notify upon completion.loadText- The pre-loaded text in the text input box.
-
-
Method Details
-
messageLoop
public void messageLoop()Handles the message loop for the overlay window.- Overrides:
messageLoopin classWindowOverlayClass
-
onExit
public void onExit()Performs actions upon exiting the overlay window.
-