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 TypeMethodDescriptionvoid
Called whenView
gets or loses a focus.Gets aView
hotkeyKeyHandler
.Gets aView
keyKeyHandler
.Gets aView
mouseMouseHandler
.Get supported commands.boolean
hasFocus()
Gets if thisView
has a focus.void
init()
boolean
runViewCommand
(String command) Run command.void
setEventLoop
(EventLoop eventLoop) Sets anEventLoop
.void
setLayer
(int index) Sets a layer index thisView
operates on.void
setViewService
(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 thisView
operates on.- Parameters:
index
- the layer index
-
focus
Called whenView
gets or loses a focus.- Parameters:
view
- the view receiving focusfocus
- flag if focus is received
-
hasFocus
boolean hasFocus()Gets if thisView
has 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:
-