Class MenuScreen.Builder
java.lang.Object
dev.xichil.mvui.MenuScreen.Builder
- Enclosing class:
MenuScreen
Builds a
MenuScreen; from MenuScreen.builder(String). Setters return the builder for chaining.-
Method Summary
Modifier and TypeMethodDescriptionAppends an entry to the list.add(StringListEditor editor) Appends aStringListEditor's entries (its list, input, Add and Remove buttons), in that order.build()Builds the screen.Appends an entry to the footer row at the bottom of the screen, which stays in place while the list scrolls.The title shown at the top of the screen.
-
Method Details
-
title
The title shown at the top of the screen. Required.- Parameters:
title- the title- Returns:
- this builder
-
add
Appends an entry to the list. ASectionis appended together with its children, right after it.- Parameters:
entry- any entry that is not a section's child- Returns:
- this builder
- Throws:
IllegalStateException- ifentryis null or is a child of a section (add the section instead)
-
add
Appends aStringListEditor's entries (its list, input, Add and Remove buttons), in that order.- Parameters:
editor- the editor- Returns:
- this builder
-
build
Builds the screen.- Returns:
- the screen
- Throws:
IllegalStateException- if the title is missing or two entries share an id
-