Package io.jmix.flowui.view.builder
Class AbstractWindowBuilder<V extends View<?>>
java.lang.Object
io.jmix.flowui.view.builder.AbstractWindowBuilder<V>
- All Implemented Interfaces:
DialogWindowBuilder<V>
- Direct Known Subclasses:
DetailWindowBuilder
,LookupWindowBuilder
,WindowBuilder
public class AbstractWindowBuilder<V extends View<?>>
extends Object
implements DialogWindowBuilder<V>
-
Field Summary
Modifier and TypeFieldDescriptionprotected Consumer<DialogWindow.AfterCloseEvent<V>>
protected Consumer<DialogWindow.AfterOpenEvent<V>>
protected final Function<AbstractWindowBuilder<V>,
DialogWindow<V>> protected final View<?>
protected String
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractWindowBuilder
(View<?> origin, Function<? extends AbstractWindowBuilder<V>, DialogWindow<V>> handler) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the dialog window.View<?>
open()
Opens built dialog window.withAfterCloseListener
(Consumer<DialogWindow.AfterCloseEvent<V>> listener) AddsDialogWindow.AfterCloseEvent
listener to the dialog window.withAfterOpenListener
(Consumer<DialogWindow.AfterOpenEvent<V>> listener) AddsDialogWindow.AfterOpenEvent
listener to the dialog window.withViewConfigurer
(Consumer<V> configurer) Adds configurer to the dialog window.
-
Field Details
-
origin
-
handler
protected final Function<AbstractWindowBuilder<V extends View<?>>,DialogWindow<V extends View<?>>> handler -
viewId
-
afterOpenListener
-
afterCloseListener
-
viewConfigurer
-
-
Constructor Details
-
AbstractWindowBuilder
protected AbstractWindowBuilder(View<?> origin, Function<? extends AbstractWindowBuilder<V>, DialogWindow<V>> handler)
-
-
Method Details
-
withAfterOpenListener
public AbstractWindowBuilder<V> withAfterOpenListener(@Nullable Consumer<DialogWindow.AfterOpenEvent<V>> listener) AddsDialogWindow.AfterOpenEvent
listener to the dialog window.- Parameters:
listener
- the listener to add- Returns:
- this instance for chaining
-
withAfterCloseListener
public AbstractWindowBuilder<V> withAfterCloseListener(@Nullable Consumer<DialogWindow.AfterCloseEvent<V>> listener) AddsDialogWindow.AfterCloseEvent
listener to the dialog window.- Parameters:
listener
- the listener to add- Returns:
- this instance for chaining
-
withViewConfigurer
Adds configurer to the dialog window.- Parameters:
configurer
- the configurer to add- Returns:
- the instance for chaining
-
getOrigin
- Specified by:
getOrigin
in interfaceDialogWindowBuilder<V extends View<?>>
- Returns:
- invoking view
-
getViewId
- Specified by:
getViewId
in interfaceDialogWindowBuilder<V extends View<?>>
- Returns:
- identifier of the opened view as specified in the
ViewController
annotation
-
getAfterOpenListener
- Specified by:
getAfterOpenListener
in interfaceDialogWindowBuilder<V extends View<?>>
- Returns:
- after open dialog listener
-
getAfterCloseListener
- Specified by:
getAfterCloseListener
in interfaceDialogWindowBuilder<V extends View<?>>
- Returns:
- after close dialog listener
-
getViewConfigurer
- Specified by:
getViewConfigurer
in interfaceDialogWindowBuilder<V extends View<?>>
- Returns:
- dialog view configurer
-
build
Builds the dialog window. Dialog window should be shown usingDialogWindow.open()
.- Returns:
- built dialog window
-
open
Opens built dialog window.- Returns:
- built dialog window
-