Interface MenuRenderer


  • public interface MenuRenderer
    Override it if you want to customize the display of the user dialog. A default implementation is provided with the package.
    See Also:
    MenuDefaultRenderer
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String footer()
      The string to print at the end of each menu.
      java.lang.String header​(java.lang.String title)
      Returns the header of the menu.
      java.lang.String inputString()
      Inputs a string from the user.
      java.lang.String invalidInput​(java.lang.String input)
      The string to print if the user made a wrong input.
      java.lang.String menusSeparator()
      The string to print between two menus.
      java.lang.String option​(java.lang.String shortcut, java.lang.String label)
      Prints an option
      java.lang.String optionsSeparator()
      The string to print between two options.
      void outputString​(java.lang.String message)
      Outputs message to the user.
      java.lang.String prompt()
      The string to print to prompt the user for input.
    • Method Detail

      • outputString

        void outputString​(java.lang.String message)
        Outputs message to the user.
        Parameters:
        message - The message to print.
      • inputString

        java.lang.String inputString()
        Inputs a string from the user.
        Returns:
        The string input from the user.
      • header

        java.lang.String header​(java.lang.String title)
        Returns the header of the menu.
        Parameters:
        title - The title that should appear in the header.
        Returns:
        The string to print.
      • option

        java.lang.String option​(java.lang.String shortcut,
                                java.lang.String label)
        Prints an option
        Parameters:
        shortcut - The shortcut to select this option.
        label - The label of the option.
        Returns:
        The string to print.
      • optionsSeparator

        java.lang.String optionsSeparator()
        The string to print between two options.
        Returns:
        The string to print.
      • footer

        java.lang.String footer()
        The string to print at the end of each menu.
        Returns:
        The string to print.
      • menusSeparator

        java.lang.String menusSeparator()
        The string to print between two menus.
        Returns:
        The string to print.
      • prompt

        java.lang.String prompt()
        The string to print to prompt the user for input.
        Returns:
        The string to print.
      • invalidInput

        java.lang.String invalidInput​(java.lang.String input)
        The string to print if the user made a wrong input.
        Parameters:
        input - The string input by the user.
        Returns:
        The string to print