Package io.jmix.ui.builder
Class ScreenBuilder
java.lang.Object
io.jmix.ui.builder.ScreenBuilder
- Direct Known Subclasses:
ScreenClassBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Function<ScreenBuilder,
Screen> protected OpenMode
protected ScreenOptions
protected final FrameOwner
protected String
-
Constructor Summary
ConstructorDescriptionScreenBuilder
(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) SetsOpenMode
for the screen and returns the builder for chaining.withOptions
(ScreenOptions options) SetsScreenOptions
for the screen and returns the builder for chaining.<S extends Screen>
ScreenClassBuilder<S>withScreenClass
(Class<S> screenClass) Sets screen class and returns theEditorClassBuilder
for 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
SetsOpenMode
for 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 theUiController
annotation orscreens.xml
.
-
withOptions
SetsScreenOptions
for the screen and returns the builder for chaining. -
withScreenClass
Sets screen class and returns theEditorClassBuilder
for 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.
-