Class TerminalUIBuilder

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

public class TerminalUIBuilder extends Object
Builder that can be used to configure and create a TerminalUI.
  • Constructor Details

  • Method Details

    • themeResolver

      public TerminalUIBuilder themeResolver(ThemeResolver themeResolver)
      Sets a ThemeResolver for TerminalUI to build.
      Parameters:
      themeResolver - the theme resolver
      Returns:
      a new builder instance
    • themeName

      public TerminalUIBuilder themeName(String themeName)
      Sets a theme name for TerminalUI to build.
      Parameters:
      themeName - the theme name
      Returns:
      a new builder instance
    • customizers

      public TerminalUIBuilder customizers(Collection<? extends TerminalUICustomizer> customizers)
      Set the TerminalUICustomizer that should be applied to the TerminalUI. Customizers are applied in the order that they were added after builder configuration has been applied. Setting this value will replace any previously configured customizers.
      Parameters:
      customizers - the customizers to set
      Returns:
      a new builder instance
    • build

      public TerminalUI build()
      Build a new TerminalUI instance and configure it using this builder.
      Returns:
      a configured TerminalUI instance.
    • configure

      public <T extends TerminalUI> T configure(T terminalUI)
      Configure the provided TerminalUI instance using this builder.
      Type Parameters:
      T - the type of terminal ui
      Parameters:
      terminalUI - the TerminalUI to configure
      Returns:
      the terminal ui instance