Class DefaultListItem

  • All Implemented Interfaces:
    ListItem, PromptItem

    public class DefaultListItem
    extends java.lang.Object
    implements ListItem
    Default implementation of ListItem interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultListItem​(java.lang.String name, java.lang.String text)  
      DefaultListItem​(java.lang.String name, java.lang.String text, boolean disabled, java.lang.String disabledText)  
      DefaultListItem​(java.lang.String name, java.lang.String text, boolean disabled, java.lang.String disabledText, java.lang.String footer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDisabledText()
      Get the text to display when this item is disabled.
      java.lang.String getFooter()
      Optional footer text shown dimmed below a list or checkbox while this item is focused.
      java.lang.String getName()
      Get the name of this item.
      java.lang.String getText()
      Get the text to display for this item.
      boolean isDisabled()
      Whether this item is disabled.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultListItem

        public DefaultListItem​(java.lang.String name,
                               java.lang.String text,
                               boolean disabled,
                               java.lang.String disabledText,
                               java.lang.String footer)
      • DefaultListItem

        public DefaultListItem​(java.lang.String name,
                               java.lang.String text,
                               boolean disabled,
                               java.lang.String disabledText)
      • DefaultListItem

        public DefaultListItem​(java.lang.String name,
                               java.lang.String text)
    • Method Detail

      • getName

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

        public java.lang.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 java.lang.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 java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object