All Implemented Interfaces:
Control, View

public class AppView extends BoxView
AppView provides an opinionated terminal UI application view controlling main viewing area, menubar, statusbar and modal window system.
  • Constructor Details

    • AppView

      public AppView(View main, View menuBar, View statusBar)
  • Method Details

    • setThemeName

      public void setThemeName(String themeName)
      Description copied from class: AbstractControl
      Sets a theme name to use.
      Specified by:
      setThemeName in interface Control
      Overrides:
      setThemeName in class AbstractControl
      Parameters:
      themeName - the theme name
    • setThemeResolver

      public void setThemeResolver(ThemeResolver themeResolver)
      Description copied from class: AbstractControl
      Specified by:
      setThemeResolver in interface Control
      Overrides:
      setThemeResolver in class AbstractControl
      Parameters:
      themeResolver - the theme resolver
    • drawInternal

      protected void drawInternal(Screen screen)
      Description copied from class: BoxView
      Possibly draws a box around this view and title in a box top boundary. Also calls a draw function if defined.
      Overrides:
      drawInternal in class BoxView
      Parameters:
      screen - the screen
    • getMouseHandler

      public MouseHandler 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 interface View
      Overrides:
      getMouseHandler in class AbstractView
      Returns:
      a view mouse handler
      See Also:
    • getKeyHandler

      public KeyHandler 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 interface View
      Overrides:
      getKeyHandler in class AbstractView
      Returns:
      a view key handler
      See Also:
    • getHotKeyHandler

      public KeyHandler getHotKeyHandler()
      Description copied from interface: View
      Gets a View hotkey KeyHandler. Can be null which indicates view will not handle any key events.
      Specified by:
      getHotKeyHandler in interface View
      Overrides:
      getHotKeyHandler in class AbstractView
      Returns:
      a view hotkey handler
      See Also:
    • hasFocus

      public boolean hasFocus()
      Description copied from interface: View
      Gets if this View has a focus.
      Specified by:
      hasFocus in interface View
      Overrides:
      hasFocus in class AbstractView
      Returns:
      true if view has a focus
    • setMenuBarVisible

      public void setMenuBarVisible(boolean visible)
      Sets visibility for a menubar.
      Parameters:
      visible - the menubar visibility
    • setStatusBarVisible

      public void setStatusBarVisible(boolean visible)
      Sets visibility for a statusbar.
      Parameters:
      visible - the statusbar visibility
    • toggleMenuBarVisibility

      public void toggleMenuBarVisibility()
      Toggles a menubar visibility.
    • toggleStatusBarVisibility

      public void toggleStatusBarVisibility()
      Toggles a statusbar visibility.