Package io.jmix.ui.builder
Class ScreenBuilder
java.lang.Object
io.jmix.ui.builder.ScreenBuilder
- Direct Known Subclasses:
ScreenClassBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Function<ScreenBuilder,Screen> protected OpenModeprotected ScreenOptionsprotected final FrameOwnerprotected String -
Constructor Summary
ConstructorsConstructorDescriptionScreenBuilder(ScreenBuilder builder) ScreenBuilder(FrameOwner origin, Function<ScreenBuilder, Screen> handler) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the screen.Returns open mode set bywithOpenMode(OpenMode).Returns screen options set bywithOptions(ScreenOptions).Returns screen id set bywithScreenId(String).show()Builds and shows the editor screen.withOpenMode(OpenMode openMode) SetsOpenModefor the screen and returns the builder for chaining.withOptions(ScreenOptions options) SetsScreenOptionsfor the screen and returns the builder for chaining.<S extends Screen>
ScreenClassBuilder<S>withScreenClass(Class<S> screenClass) Sets screen class and returns theEditorClassBuilderfor chaining.withScreenId(String screenId) Sets screen id and returns the builder for chaining.
-
Field Details
-
origin
-
handler
-
openMode
-
options
-
screenId
-
-
Constructor Details
-
ScreenBuilder
-
ScreenBuilder
-
-
Method Details
-
withOpenMode
SetsOpenModefor the screen and returns the builder for chaining.For example:
builder.withOpenMode(OpenMode.DIALOG).build(); -
withScreenId
Sets screen id and returns the builder for chaining.- Parameters:
screenId- identifier of the screen as specified in theUiControllerannotation orscreens.xml.
-
withOptions
SetsScreenOptionsfor the screen and returns the builder for chaining. -
withScreenClass
Sets screen class and returns theEditorClassBuilderfor chaining.- Parameters:
screenClass- class of the screen controller
-
getOrigin
-
getOpenMode
Returns open mode set bywithOpenMode(OpenMode). -
getOptions
Returns screen options set bywithOptions(ScreenOptions). -
getScreenId
Returns screen id set bywithScreenId(String). -
build
Builds the screen. Screen should be shown usingScreen.show(). -
show
Builds and shows the editor screen.
-