-
- All Known Subinterfaces:
CheckboxItem,ChoiceItem,ConfirmItem,ListItem,SeparatorItem
- All Known Implementing Classes:
DefaultCheckboxItem,DefaultChoiceItem,DefaultListItem,DefaultSeparatorItem
public interface PromptItemInterface for all UI items in the Prompter. Items are immutable value objects that represent the configuration of prompt elements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.StringgetDisabledText()Get the text to display when this item is disabled.default java.lang.StringgetFooter()Optional footer text shown dimmed below a list or checkbox while this item is focused.java.lang.StringgetName()Get the name of this item.java.lang.StringgetText()Get the text to display for this item.default booleanisDisabled()Whether this item is disabled.default booleanisSelectable()Whether this item is selectable.
-
-
-
Method Detail
-
getName
java.lang.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
java.lang.String getText()
Get the text to display for this item.- Returns:
- the text
-
getDisabledText
default java.lang.String getDisabledText()
Get the text to display when this item is disabled.- Returns:
- the disabled text
-
getFooter
default java.lang.String getFooter()
Optional footer text shown dimmed below a list or checkbox while this item is focused.- Returns:
- the footer text, or
null/empty for no footer
-
-