Class 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 Detail

      • DefaultTextPrompt

        public DefaultTextPrompt​(java.lang.String name,
                                 java.lang.String message,
                                 java.lang.String text)
      • DefaultTextPrompt

        public DefaultTextPrompt​(java.lang.String name,
                                 java.lang.String message,
                                 java.util.List<org.jline.utils.AttributedString> lines)
    • Method Detail

      • getText

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

        public java.util.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