Class DialogView
java.lang.Object
org.springframework.shell.component.view.control.AbstractControl
org.springframework.shell.component.view.control.AbstractView
org.springframework.shell.component.view.control.WindowView
org.springframework.shell.component.view.control.DialogView
DialogView
is a View
with border, number of buttons and area
for a generic content.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
-
Constructor Summary
ConstructorDescriptionDialogView
(View content, List<ButtonView> buttons) DialogView
(View content, ButtonView... buttons) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
drawInternal
(Screen screen) Component internal drawing method.protected String
Handles mouse events by dispatching registered consumers into an event loop.void
setEventLoop
(EventLoop eventLoop) Set anEventLoop
.void
setLayer
(int index) Sets a layer index thisView
operates on.void
setRect
(int x, int y, int width, int height) Sets bounds where thisControl
should operate.Methods inherited from class org.springframework.shell.component.view.control.WindowView
getInnerRect, setBackgroundColor
Methods inherited from class org.springframework.shell.component.view.control.AbstractView
destroy, dispatch, dispatchKeyRunCommand, dispatchMouseRunCommand, dispatchRunnable, draw, drawBackground, focus, getDrawFunction, getEventLoop, getHotKeyBindings, getHotKeyHandler, getKeyBindings, getKeyHandler, getLayer, getMouseBindings, getViewCommands, getViewService, hasFocus, init, initInternal, onDestroy, registerHotKeyBinding, registerHotKeyBinding, registerHotKeyBinding, registerKeyBinding, registerKeyBinding, registerKeyBinding, registerMouseBinding, registerMouseBinding, registerMouseBinding, registerViewCommand, runViewCommand, setDrawFunction, setViewService, shortcut
Methods inherited from class org.springframework.shell.component.view.control.AbstractControl
getRect, getThemeName, getThemeResolver, resolveThemeBackground, resolveThemeForeground, 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
-
DialogView
public DialogView() -
DialogView
-
DialogView
-
-
Method Details
-
setEventLoop
Description copied from class:AbstractView
Set anEventLoop
.- Specified by:
setEventLoop
in interfaceView
- Overrides:
setEventLoop
in classAbstractView
- Parameters:
eventLoop
- the event loop
-
getBackgroundStyle
- Overrides:
getBackgroundStyle
in classWindowView
-
setLayer
public void setLayer(int index) Description copied from interface:View
Sets a layer index thisView
operates on.- Specified by:
setLayer
in interfaceView
- Overrides:
setLayer
in classAbstractView
- Parameters:
index
- the layer index
-
getMouseHandler
Description copied from class:AbstractView
Handles mouse events by dispatching registered consumers into an event loop. Override to change default behaviour.- Specified by:
getMouseHandler
in interfaceView
- Overrides:
getMouseHandler
in classAbstractView
- Returns:
- a view mouse handler
- See Also:
-
setRect
public void setRect(int x, int y, int width, int height) Description copied from interface:Control
Sets bounds where thisControl
should operate.- Specified by:
setRect
in interfaceControl
- Overrides:
setRect
in classAbstractControl
- Parameters:
x
- a x coord of a bounded boxy
- an y coord of a bounded boxwidth
- a width of a bounded boxheight
- a height of a bounded box
-
drawInternal
Description copied from class:AbstractView
Component internal drawing method. Implementing classes needs to define this method to draw something into aScreen
.- Overrides:
drawInternal
in classWindowView
- Parameters:
screen
- the screen
-