public class ScreenBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.function.Function<ScreenBuilder,Screen> |
handler |
protected Screens.LaunchMode |
launchMode |
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.
|
Screens.LaunchMode |
getLaunchMode()
Returns launch mode set by
withLaunchMode(Screens.LaunchMode) . |
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 |
withLaunchMode(Screens.LaunchMode launchMode)
Sets
Screens.LaunchMode for the screen and returns the builder for chaining. |
ScreenBuilder |
withOpenMode(OpenMode openMode)
Sets
Screens.LaunchMode 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 Screens.LaunchMode launchMode
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 withLaunchMode(Screens.LaunchMode launchMode)
Screens.LaunchMode
for the screen and returns the builder for chaining.
For example: builder.withLaunchMode(OpenMode.DIALOG).build();
public ScreenBuilder withOpenMode(OpenMode openMode)
Screens.LaunchMode
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 Screens.LaunchMode getLaunchMode()
withLaunchMode(Screens.LaunchMode)
.public ScreenOptions getOptions()
withOptions(ScreenOptions)
.public java.lang.String getScreenId()
withScreenId(String)
.public Screen build()
Screen.show()
.public Screen show()