Class InputView
java.lang.Object
org.springframework.shell.component.view.control.AbstractControl
org.springframework.shell.component.view.control.AbstractView
org.springframework.shell.component.view.control.BoxView
org.springframework.shell.component.view.control.InputView
InputView
is used as a text input.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final record
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
drawInternal
(Screen screen) Possibly draws a box around this view and title in a box top boundary.Get a current known input text.Handles keys by dispatching registered command runnable into an event loop.protected void
Internal init method called fromAbstractView.init()
.Methods inherited from class org.springframework.shell.component.view.control.BoxView
drawBackground, getBackgroundStyle, getInnerRect, isShowBorder, setBackgroundColor, setBorderPadding, setFocusedTitleColor, setFocusedTitleStyle, setRect, setShowBorder, setTitle, setTitleAlign, setTitleColor, setTitleStyle
Methods inherited from class org.springframework.shell.component.view.control.AbstractView
destroy, dispatch, dispatchKeyRunCommand, dispatchMouseRunCommand, dispatchRunnable, draw, focus, getDrawFunction, getEventLoop, getHotKeyBindings, getHotKeyHandler, getKeyBindings, getLayer, getMouseBindings, getMouseHandler, getViewCommands, getViewService, hasFocus, init, onDestroy, registerHotKeyBinding, registerHotKeyBinding, registerHotKeyBinding, registerKeyBinding, registerKeyBinding, registerKeyBinding, registerMouseBinding, registerMouseBinding, registerMouseBinding, registerViewCommand, runViewCommand, setDrawFunction, setEventLoop, setLayer, setViewService, shortcut
Methods inherited from class org.springframework.shell.component.view.control.AbstractControl
getRect, getThemeName, getThemeResolver, resolveThemeBackground, resolveThemeForeground, resolveThemeSpinner, resolveThemeStyle, setThemeName, setThemeResolver
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.shell.component.view.control.Control
getRect, setThemeName, setThemeResolver
-
Constructor Details
-
InputView
public InputView()
-
-
Method Details
-
initInternal
protected void initInternal()Description copied from class:AbstractView
Internal init method called fromAbstractView.init()
. Override to do something usefull. Typically key and mousebindings are registered from this method.- Overrides:
initInternal
in classAbstractView
-
getKeyHandler
Description copied from class:AbstractView
Handles keys by dispatching registered command runnable into an event loop. Override to change default behaviour.- Specified by:
getKeyHandler
in interfaceView
- Overrides:
getKeyHandler
in classAbstractView
- Returns:
- a view key handler
- See Also:
-
drawInternal
Description copied from class:BoxView
Possibly draws a box around this view and title in a box top boundary. Also calls adraw function
if defined.- Overrides:
drawInternal
in classBoxView
- Parameters:
screen
- the screen
-
getInputText
Get a current known input text.- Returns:
- current input text
-