Class MenuSection


  • public final class MenuSection
    extends AbstractListSection
    A vertical, arrow-navigable, scrollable list of strings with a selection; ENTER fires onSelect.
    • Constructor Detail

      • MenuSection

        public MenuSection​(java.lang.String... items)
        Creates a menu with the given items.
        Parameters:
        items - the menu item labels in order
    • Method Detail

      • onSelect

        public MenuSection onSelect​(java.util.function.IntConsumer handler)
        Description copied from class: AbstractListSection
        Sets the handler called with the row index on ENTER.
        Overrides:
        onSelect in class AbstractListSection
        Parameters:
        handler - the activation handler
        Returns:
        this AbstractListSection for chaining