Class DefaultListItem

java.lang.Object
org.jline.prompt.impl.DefaultListItem
All Implemented Interfaces:
ListItem, PromptItem

public class DefaultListItem extends Object implements ListItem
Default implementation of ListItem interface.
  • Constructor Details

    • DefaultListItem

      public DefaultListItem(String name, String text, boolean disabled, String disabledText, String footer)
    • DefaultListItem

      public DefaultListItem(String name, String text, boolean disabled, String disabledText)
    • DefaultListItem

      public DefaultListItem(String name, String text)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: PromptItem
      Get the name of this item.
      Specified by:
      getName in interface PromptItem
      Returns:
      the name
    • getText

      public String getText()
      Description copied from interface: PromptItem
      Get the text to display for this item.
      Specified by:
      getText in interface PromptItem
      Returns:
      the text
    • isDisabled

      public boolean isDisabled()
      Description copied from interface: PromptItem
      Whether this item is disabled.
      Specified by:
      isDisabled in interface PromptItem
      Returns:
      true if this item is disabled
    • getDisabledText

      public String getDisabledText()
      Description copied from interface: PromptItem
      Get the text to display when this item is disabled.
      Specified by:
      getDisabledText in interface PromptItem
      Returns:
      the disabled text
    • getFooter

      public String getFooter()
      Description copied from interface: PromptItem
      Optional footer text shown dimmed below a list or checkbox while this item is focused.
      Specified by:
      getFooter in interface PromptItem
      Returns:
      the footer text, or null/empty for no footer
    • toString

      public String toString()
      Overrides:
      toString in class Object