java.lang.Object
org.jline.prompt.impl.DefaultCheckboxItem
- All Implemented Interfaces:
CheckboxItem,PromptItem
Default implementation of CheckboxItem interface.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCheckboxItem(String name, String text) DefaultCheckboxItem(String name, String text, boolean checked) DefaultCheckboxItem(String name, String text, boolean checked, boolean disabled, String disabledText) DefaultCheckboxItem(String name, String text, boolean checked, boolean disabled, String disabledText, String footer) -
Method Summary
Modifier and TypeMethodDescriptionGet the text to display when this item is disabled.Optional 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.booleanWhether this item is disabled.booleanWhether this checkbox is initially checked.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jline.prompt.PromptItem
isSelectable
-
Constructor Details
-
DefaultCheckboxItem
-
DefaultCheckboxItem
-
DefaultCheckboxItem
-
DefaultCheckboxItem
-
-
Method Details
-
getName
Description copied from interface:PromptItemGet the name of this item.- Specified by:
getNamein interfacePromptItem- Returns:
- the name
-
getText
Description copied from interface:PromptItemGet the text to display for this item.- Specified by:
getTextin interfacePromptItem- Returns:
- the text
-
isInitiallyChecked
public boolean isInitiallyChecked()Description copied from interface:CheckboxItemWhether this checkbox is initially checked. This represents the default/initial state, not the current selection.- Specified by:
isInitiallyCheckedin interfaceCheckboxItem- Returns:
- true if this checkbox is initially checked
-
isDisabled
public boolean isDisabled()Description copied from interface:PromptItemWhether this item is disabled.- Specified by:
isDisabledin interfacePromptItem- Returns:
- true if this item is disabled
-
getDisabledText
Description copied from interface:PromptItemGet the text to display when this item is disabled.- Specified by:
getDisabledTextin interfacePromptItem- Returns:
- the disabled text
-
toString
-