Module cli

Class CLIConsolePanel

java.lang.Object
de.grogra.cli.ui.CLIPanelSupport
de.grogra.cli.ui.CLIConsolePanel
All Implemented Interfaces:
ExecutableComponent, RegistryContext, Console, Context, Panel, Synchronizer.Callback, Disposable

public class CLIConsolePanel extends CLIPanelSupport implements Console
  • Constructor Details

    • CLIConsolePanel

      public CLIConsolePanel(Context context, Map params)
  • Method Details

    • getContent

      public ComponentWrapper getContent()
      Specified by:
      getContent in interface Panel
      Overrides:
      getContent in class CLIPanelSupport
    • setContent

      public void setContent(ComponentWrapper content)
      Specified by:
      setContent in interface Panel
      Overrides:
      setContent in class CLIPanelSupport
    • disposeImpl

      protected void disposeImpl()
      Overrides:
      disposeImpl in class CLIPanelSupport
    • enter

      public void enter(String text)
      Description copied from interface: Console
      Enters text as if the user had typed this text.
      Specified by:
      enter in interface Console
      Parameters:
      text - text to enter in the console
    • clear

      public void clear()
      Description copied from interface: Console
      Clears the console.
      Specified by:
      clear in interface Console
    • getIn

      public Reader getIn()
      Description copied from interface: Console
      This method returns a Reader which can be used to obtain the textual input from the user.
      Specified by:
      getIn in interface Console
      Returns:
      a reader
    • getOut

      public de.grogra.cli.ui.CLIConsolePanel.ConsoleWriterCLI getOut()
      Description copied from interface: Console
      This method returns a ConsoleWriter which is used to write to the console. It should be used for normal messages.
      Specified by:
      getOut in interface Console
      Returns:
      a writer
    • getErr

      public de.grogra.cli.ui.CLIConsolePanel.ConsoleWriterCLI getErr()
      Description copied from interface: Console
      This method returns a ConsoleWriter which is used to write to the console. It should be used for error messages. Implementations should use a different color to highlight the characters which are written through this writer.
      Specified by:
      getErr in interface Console
      Returns:
      a writer
    • setNameCompletion

      public void setNameCompletion(NameCompletion nc)
      Specified by:
      setNameCompletion in interface Console