Package io.jmix.ui.builder
Class ScreenClassBuilder<S extends Screen>
java.lang.Object
io.jmix.ui.builder.ScreenBuilder
io.jmix.ui.builder.ScreenClassBuilder<S>
Screen builder that knows the concrete screen class. It's
build()
method returns that class.-
Field Summary
Modifier and TypeFieldDescriptionprotected Consumer<AfterScreenCloseEvent<S>>
protected Consumer<AfterScreenShowEvent<S>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the screen.Returns screen class.show()
Builds and shows the editor screen.withAfterCloseListener
(Consumer<AfterScreenCloseEvent<S>> listener) AddsScreen.AfterCloseEvent
listener to the screen.withAfterShowListener
(Consumer<AfterScreenShowEvent<S>> listener) AddsScreen.AfterShowEvent
listener to the 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.withScreenId
(String screenId) Sets screen id and returns the builder for chaining.Methods inherited from class io.jmix.ui.builder.ScreenBuilder
getOpenMode, getOptions, getOrigin, getScreenId, withScreenClass
-
Field Details
-
screenClass
-
afterShowListener
-
afterCloseListener
-
-
Constructor Details
-
ScreenClassBuilder
-
-
Method Details
-
withOpenMode
Description copied from class:ScreenBuilder
SetsOpenMode
for the screen and returns the builder for chaining.For example:
builder.withOpenMode(OpenMode.DIALOG).build();
- Overrides:
withOpenMode
in classScreenBuilder
-
withOptions
Description copied from class:ScreenBuilder
SetsScreenOptions
for the screen and returns the builder for chaining.- Overrides:
withOptions
in classScreenBuilder
-
withScreenId
Description copied from class:ScreenBuilder
Sets screen id and returns the builder for chaining.- Overrides:
withScreenId
in classScreenBuilder
- Parameters:
screenId
- identifier of the screen as specified in theUiController
annotation orscreens.xml
.
-
withAfterShowListener
AddsScreen.AfterShowEvent
listener to the screen.- Parameters:
listener
- listener
-
withAfterCloseListener
AddsScreen.AfterCloseEvent
listener to the screen.- Parameters:
listener
- listener
-
getScreenClass
Returns screen class. -
getAfterShowListener
- Returns:
- after show screen listener
-
getAfterCloseListener
- Returns:
- after close screen listener
-
build
Description copied from class:ScreenBuilder
Builds the screen. Screen should be shown usingScreen.show()
.- Overrides:
build
in classScreenBuilder
-
show
Description copied from class:ScreenBuilder
Builds and shows the editor screen.- Overrides:
show
in classScreenBuilder
-