Package io.jmix.flowui.view.builder
Class WindowBuilder<V extends View<?>>
java.lang.Object
io.jmix.flowui.view.builder.AbstractWindowBuilder<V>
io.jmix.flowui.view.builder.WindowBuilder<V>
- Type Parameters:
V
- a view type which is opened in a dialog window
- All Implemented Interfaces:
DialogWindowBuilder<V>
,DialogWindowClassBuilder<V>
public class WindowBuilder<V extends View<?>>
extends AbstractWindowBuilder<V>
implements DialogWindowClassBuilder<V>
Provides a fluent interface to configure and open a view in a
DialogWindow
.-
Field Summary
Fields inherited from class io.jmix.flowui.view.builder.AbstractWindowBuilder
afterCloseListener, afterOpenListener, handler, origin, viewId
-
Constructor Summary
ModifierConstructorDescriptionprotected
WindowBuilder
(WindowBuilder<V> builder, Class<V> viewClass) WindowBuilder
(View<?> origin, Class<V> viewClass, Function<? extends WindowBuilder<V>, DialogWindow<V>> handler) WindowBuilder
(View<?> origin, String viewId, Function<? extends WindowBuilder<V>, DialogWindow<V>> handler) -
Method Summary
Modifier and TypeMethodDescriptionwithAfterCloseListener
(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.<T extends View<?>>
WindowBuilder<T>withViewClass
(Class<T> viewClass) withViewId
(String viewId) Methods inherited from class io.jmix.flowui.view.builder.AbstractWindowBuilder
build, getAfterCloseListener, getAfterOpenListener, getOrigin, getViewId, open
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.flowui.view.builder.DialogWindowBuilder
getAfterCloseListener, getAfterOpenListener, getOrigin, getViewId
-
Field Details
-
viewClass
-
-
Constructor Details
-
WindowBuilder
-
WindowBuilder
public WindowBuilder(View<?> origin, Class<V> viewClass, Function<? extends WindowBuilder<V>, DialogWindow<V>> handler) -
WindowBuilder
public WindowBuilder(View<?> origin, String viewId, Function<? extends WindowBuilder<V>, DialogWindow<V>> handler)
-
-
Method Details
-
withAfterOpenListener
public WindowBuilder<V> withAfterOpenListener(@Nullable Consumer<DialogWindow.AfterOpenEvent<V>> listener) Description copied from class:AbstractWindowBuilder
AddsDialogWindow.AfterOpenEvent
listener to the dialog window.- Overrides:
withAfterOpenListener
in classAbstractWindowBuilder<V extends View<?>>
- Parameters:
listener
- the listener to add- Returns:
- this instance for chaining
-
withAfterCloseListener
public WindowBuilder<V> withAfterCloseListener(@Nullable Consumer<DialogWindow.AfterCloseEvent<V>> listener) Description copied from class:AbstractWindowBuilder
AddsDialogWindow.AfterCloseEvent
listener to the dialog window.- Overrides:
withAfterCloseListener
in classAbstractWindowBuilder<V extends View<?>>
- Parameters:
listener
- the listener to add- Returns:
- this instance for chaining
-
withViewId
-
withViewClass
-
getViewClass
- Specified by:
getViewClass
in interfaceDialogWindowClassBuilder<V extends View<?>>
- Returns:
- opened view class
-