- All Known Subinterfaces:
CheckboxItem,ChoiceItem,ConfirmItem,ListItem,SeparatorItem
- All Known Implementing Classes:
DefaultCheckboxItem,DefaultChoiceItem,DefaultListItem,DefaultSeparatorItem
public interface PromptItem
Interface for all UI items in the Prompter.
Items are immutable value objects that represent the configuration of prompt elements.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringGet the text to display when this item is disabled.default StringOptional footer text shown dimmed below a list or checkbox while this item is focused.getName()Get the name of this item.getText()Get the text to display for this item.default booleanWhether this item is disabled.default booleanWhether this item is selectable.
-
Method Details
-
getName
String getName()Get the name of this item.- Returns:
- the name
-
isDisabled
default boolean isDisabled()Whether this item is disabled.- Returns:
- true if this item is disabled
-
isSelectable
default boolean isSelectable()Whether this item is selectable.- Returns:
- true if this item is selectable
-
getText
String getText()Get the text to display for this item.- Returns:
- the text
-
getDisabledText
Get the text to display when this item is disabled.- Returns:
- the disabled text
-