Class TerminalUI

java.lang.Object
org.springframework.shell.component.view.TerminalUI

public class TerminalUI extends Object
TerminalUI is a main component orchestrating terminal, eventloop, key/mouse events and view structure to work together. In many ways it can be think of being a "main application" when terminal ui is shown in a screen.
  • Constructor Details

    • TerminalUI

      public TerminalUI(org.jline.terminal.Terminal terminal)
      Constructs a handler with a given terminal.
      Parameters:
      terminal - the terminal
  • Method Details

    • setRoot

      public void setRoot(View root, boolean fullScreen)
      Sets a root view.
      Parameters:
      root - the root view
      fullScreen - if root view should request full screen
    • run

      public void run()
      Run and start execution loop. This method blocks until run loop exits.
    • getEventLoop

      public EventLoop getEventLoop()
      Gets an EventLoop.
      Returns:
      an event loop
    • redraw

      public void redraw()
      Redraw a whole screen. Essentially a message is dispatched to an event loop which is handled as soon as possible.
    • setFocus

      public void setFocus(@Nullable View view)