Interface View
- All Superinterfaces:
Control
- All Known Implementing Classes:
AbstractView,AppView,BoxView,ButtonView,DialogView,GridView,InputView,ListView,MenuBarView,MenuView,ProgressView,StatusBarView,WindowView
Base interface for all views. Represents a visible element that can render
itself and contains zero or more nested
Views.-
Method Summary
Modifier and TypeMethodDescriptionvoidCalled whenViewgets or loses a focus.Gets aViewhotkeyKeyHandler.Gets aViewkeyKeyHandler.Gets aViewmouseMouseHandler.Get supported commands.booleanhasFocus()Gets if thisViewhas a focus.voidinit()booleanrunViewCommand(String command) Run command.voidsetEventLoop(EventLoop eventLoop) Sets anEventLoop.voidsetLayer(int index) Sets a layer index thisViewoperates on.voidsetViewService(ViewService viewService) Sets aViewService.Methods inherited from interface org.springframework.shell.component.view.control.Control
draw, getRect, setRect, setThemeName, setThemeResolver
-
Method Details
-
init
void init() -
setLayer
void setLayer(int index) Sets a layer index thisViewoperates on.- Parameters:
index- the layer index
-
focus
Called whenViewgets or loses a focus.- Parameters:
view- the view receiving focusfocus- flag if focus is received
-
hasFocus
boolean hasFocus()Gets if thisViewhas a focus.- Returns:
- true if view has a focus
-
getMouseHandler
- Returns:
- a view mouse handler
- See Also:
-
getKeyHandler
- Returns:
- a view key handler
- See Also:
-
getHotKeyHandler
- Returns:
- a view hotkey handler
- See Also:
-
setEventLoop
Sets anEventLoop.- Parameters:
eventLoop- the event loop
-
setViewService
Sets aViewService.- Parameters:
viewService- the view service
-
getViewCommands
Get supported commands.- Returns:
- supported commands
- See Also:
-
runViewCommand
Run command.- Parameters:
command- the command to run- Returns:
- true if command was succesfully dispatched
- See Also:
-