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
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionDialogView(View content, List<ButtonView> buttons) DialogView(View content, ButtonView... buttons) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddrawInternal(Screen screen) Component internal drawing method.protected StringHandles mouse events by dispatching registered consumers into an event loop.voidsetEventLoop(EventLoop eventLoop) Set anEventLoop.voidsetLayer(int index) Sets a layer index thisViewoperates on.voidsetRect(int x, int y, int width, int height) Sets bounds where thisControlshould operate.Methods inherited from class org.springframework.shell.component.view.control.WindowView
getInnerRect, setBackgroundColorMethods 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, shortcutMethods inherited from class org.springframework.shell.component.view.control.AbstractControl
getRect, getThemeName, getThemeResolver, resolveThemeBackground, resolveThemeForeground, resolveThemeSpinner, resolveThemeStyle, setThemeName, setThemeResolverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:AbstractViewSet anEventLoop.- Specified by:
setEventLoopin interfaceView- Overrides:
setEventLoopin classAbstractView- Parameters:
eventLoop- the event loop
-
getBackgroundStyle
- Overrides:
getBackgroundStylein classWindowView
-
setLayer
public void setLayer(int index) Description copied from interface:ViewSets a layer index thisViewoperates on.- Specified by:
setLayerin interfaceView- Overrides:
setLayerin classAbstractView- Parameters:
index- the layer index
-
getMouseHandler
Description copied from class:AbstractViewHandles mouse events by dispatching registered consumers into an event loop. Override to change default behaviour.- Specified by:
getMouseHandlerin interfaceView- Overrides:
getMouseHandlerin classAbstractView- Returns:
- a view mouse handler
- See Also:
-
setRect
public void setRect(int x, int y, int width, int height) Description copied from interface:ControlSets bounds where thisControlshould operate.- Specified by:
setRectin interfaceControl- Overrides:
setRectin 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:AbstractViewComponent internal drawing method. Implementing classes needs to define this method to draw something into aScreen.- Overrides:
drawInternalin classWindowView- Parameters:
screen- the screen
-