Module is.codion.swing.common.ui
Package is.codion.swing.common.ui.dialog
Class AbstractDialogBuilder<B extends DialogBuilder<B>>
java.lang.Object
is.codion.swing.common.ui.dialog.AbstractDialogBuilder<B>
- Type Parameters:
B- the builder type
- All Implemented Interfaces:
DialogBuilder<B>
public abstract class AbstractDialogBuilder<B extends DialogBuilder<B>>
extends Object
implements DialogBuilder<B>
A base class for Dialog builders.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<KeyEvents.Builder> protected @Nullable Observable<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Bfinal BkeyEvent(KeyEvents.Builder keyEventBuilder) Enables the key event defined by the givenKeyEvents.Builderon the dialog root pane.final BOverridesDialogBuilder.locationRelativeTo(Component).final BlocationRelativeTo(@Nullable Component locationRelativeTo) final Bfinal BSets the dialog owner as the parent window of the given component.final BSets the dialog owner as the given window.protected final Bself()final Btitle(@Nullable Observable<String> title) final B
-
Field Details
-
keyEventBuilders
-
onBuildConsumers
-
owner
-
locationRelativeTo
-
location
-
title
-
icon
-
-
Constructor Details
-
AbstractDialogBuilder
public AbstractDialogBuilder()
-
-
Method Details
-
owner
Description copied from interface:DialogBuilderSets the dialog owner as the given window. Also sets theDialogBuilder.locationRelativeTo(Component)to the given window in case one has not been specified.- Specified by:
ownerin interfaceDialogBuilder<B extends DialogBuilder<B>>- Parameters:
owner- the dialog owner- Returns:
- this DialogBuilder instance
-
owner
Description copied from interface:DialogBuilderSets the dialog owner as the parent window of the given component. Also sets theDialogBuilder.locationRelativeTo(Component)using the given component in case one has not been specified.- Specified by:
ownerin interfaceDialogBuilder<B extends DialogBuilder<B>>- Parameters:
owner- the dialog parent component- Returns:
- this builder instance
-
locationRelativeTo
- Specified by:
locationRelativeToin interfaceDialogBuilder<B extends DialogBuilder<B>>- Parameters:
locationRelativeTo- the component for the relative location- Returns:
- this builder instance
-
location
Description copied from interface:DialogBuilderOverridesDialogBuilder.locationRelativeTo(Component).- Specified by:
locationin interfaceDialogBuilder<B extends DialogBuilder<B>>- Parameters:
location- the location of the dialog- Returns:
- this builder instance
-
title
- Specified by:
titlein interfaceDialogBuilder<B extends DialogBuilder<B>>- Parameters:
title- the dialog title- Returns:
- this builder instance
-
title
- Specified by:
titlein interfaceDialogBuilder<B extends DialogBuilder<B>>- Parameters:
title- an observable for a dynamic dialog title- Returns:
- this builder instance
-
icon
- Specified by:
iconin interfaceDialogBuilder<B extends DialogBuilder<B>>- Parameters:
icon- the dialog icon- Returns:
- this builder instance
-
keyEvent
Description copied from interface:DialogBuilderEnables the key event defined by the givenKeyEvents.Builderon the dialog root pane.- Specified by:
keyEventin interfaceDialogBuilder<B extends DialogBuilder<B>>- Parameters:
keyEventBuilder- a key event builder to enable on the dialog root pane- Returns:
- this builder instance
-
onBuild
- Specified by:
onBuildin interfaceDialogBuilder<B extends DialogBuilder<B>>- Parameters:
onBuild- called when the dialog has been built, before it is shown- Returns:
- this builder instance
-
self
-