public class ScreenBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.function.Function<ScreenBuilder,Screen> |
handler |
protected OpenMode |
openMode |
protected ScreenOptions |
options |
protected FrameOwner |
origin |
protected java.lang.String |
screenId |
Constructor and Description |
---|
ScreenBuilder(FrameOwner origin,
java.util.function.Function<ScreenBuilder,Screen> handler) |
ScreenBuilder(ScreenBuilder builder) |
Modifier and Type | Method and Description |
---|---|
Screen |
build()
Builds the screen.
|
OpenMode |
getOpenMode()
Returns open mode set by
withOpenMode(OpenMode) . |
ScreenOptions |
getOptions()
Returns screen options set by
withOptions(ScreenOptions) . |
FrameOwner |
getOrigin() |
java.lang.String |
getScreenId()
Returns screen id set by
withScreenId(String) . |
Screen |
show()
Builds and shows the editor screen.
|
ScreenBuilder |
withOpenMode(OpenMode openMode)
Sets
OpenMode for the screen and returns the builder for chaining. |
ScreenBuilder |
withOptions(ScreenOptions options)
Sets
ScreenOptions for the screen and returns the builder for chaining. |
<S extends Screen> |
withScreenClass(java.lang.Class<S> screenClass)
Sets screen class and returns the
EditorClassBuilder for chaining. |
ScreenBuilder |
withScreenId(java.lang.String screenId)
Sets screen id and returns the builder for chaining.
|
protected final FrameOwner origin
protected final java.util.function.Function<ScreenBuilder,Screen> handler
protected OpenMode openMode
protected ScreenOptions options
protected java.lang.String screenId
public ScreenBuilder(ScreenBuilder builder)
public ScreenBuilder(FrameOwner origin, java.util.function.Function<ScreenBuilder,Screen> handler)
public ScreenBuilder withOpenMode(OpenMode openMode)
OpenMode
for the screen and returns the builder for chaining.
For example: builder.withOpenMode(OpenMode.DIALOG).build();
public ScreenBuilder withScreenId(java.lang.String screenId)
screenId
- identifier of the screen as specified in the UiController
annotation
or screens.xml
.public ScreenBuilder withOptions(ScreenOptions options)
ScreenOptions
for the screen and returns the builder for chaining.public <S extends Screen> ScreenClassBuilder<S> withScreenClass(java.lang.Class<S> screenClass)
EditorClassBuilder
for chaining.screenClass
- class of the screen controllerpublic FrameOwner getOrigin()
public OpenMode getOpenMode()
withOpenMode(OpenMode)
.public ScreenOptions getOptions()
withOptions(ScreenOptions)
.@Nullable public java.lang.String getScreenId()
withScreenId(String)
.public Screen build()
Screen.show()
.public Screen show()