- 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.
-
-
Field Summary
-
Fields inherited from class org.jline.prompt.impl.DefaultPrompt
message, name
-
-
Constructor Summary
Constructors Constructor Description DefaultTextPrompt(java.lang.String name, java.lang.String message, java.lang.String text)DefaultTextPrompt(java.lang.String name, java.lang.String message, java.util.List<org.jline.utils.AttributedString> lines)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<org.jline.utils.AttributedString>getLines()Get the text lines as AttributedString list.java.lang.StringgetText()Get the text to display.-
Methods inherited from class org.jline.prompt.impl.DefaultPrompt
getFilter, getMessage, getName, getTransformer, setFilter, setTransformer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jline.prompt.Prompt
getFilter, getMessage, getName, getTransformer
-
-
-
-
Method Detail
-
getText
public java.lang.String getText()
Description copied from interface:TextPromptGet the text to display.- Specified by:
getTextin interfaceTextPrompt- Returns:
- the text
-
getLines
public java.util.List<org.jline.utils.AttributedString> getLines()
Description copied from interface:TextPromptGet the text lines as AttributedString list. This is used for adding to the header like console-ui's Text.getLines().- Specified by:
getLinesin interfaceTextPrompt- Returns:
- the text lines
-
-