Package com.tonic.vellum.widget
Class MenuSection
- java.lang.Object
-
- com.tonic.vellum.Section
-
- com.tonic.vellum.widget.AbstractListSection
-
- com.tonic.vellum.widget.MenuSection
-
public final class MenuSection extends AbstractListSection
A vertical, arrow-navigable, scrollable list of strings with a selection; ENTER firesonSelect.
-
-
Constructor Summary
Constructors Constructor Description MenuSection(java.lang.String... items)Creates a menu with the given items.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MenuSectiononSelect(java.util.function.IntConsumer handler)Sets the handler called with the row index on ENTER.-
Methods inherited from class com.tonic.vellum.widget.AbstractListSection
onHighlight, select, selectedIndex
-
-
-
-
Method Detail
-
onSelect
public MenuSection onSelect(java.util.function.IntConsumer handler)
Description copied from class:AbstractListSectionSets the handler called with the row index on ENTER.- Overrides:
onSelectin classAbstractListSection- Parameters:
handler- the activation handler- Returns:
- this AbstractListSection for chaining
-
-