Class DefaultTextPrompt

java.lang.Object
org.jline.prompt.impl.DefaultPrompt
org.jline.prompt.impl.DefaultTextPrompt
All Implemented Interfaces:
Prompt, TextPrompt

public class DefaultTextPrompt extends DefaultPrompt implements TextPrompt
Default implementation of TextPrompt interface. This is now the native implementation that doesn't depend on console-ui.
  • Constructor Details

    • DefaultTextPrompt

      public DefaultTextPrompt(String name, String message, String text)
    • DefaultTextPrompt

      public DefaultTextPrompt(String name, String message, List<org.jline.utils.AttributedString> lines)
  • Method Details

    • getText

      public String getText()
      Description copied from interface: TextPrompt
      Get the text to display.
      Specified by:
      getText in interface TextPrompt
      Returns:
      the text
    • getLines

      public List<org.jline.utils.AttributedString> getLines()
      Description copied from interface: TextPrompt
      Get the text lines as AttributedString list. This is used for adding to the header like console-ui's Text.getLines().
      Specified by:
      getLines in interface TextPrompt
      Returns:
      the text lines