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 class AbstractDialogBuilder<B extends DialogBuilder<B>>
extends Object
implements DialogBuilder<B>
A base class for Dialog builders.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ImageIcon
protected final List<KeyEvents.Builder>
protected Point
protected Component
protected Window
protected ValueObserver<String>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal B
final B
keyEvent
(KeyEvents.Builder keyEventBuilder) Enables the key event defined by the givenKeyEvents.Builder
on the dialog root pane.final B
OverridesDialogBuilder.locationRelativeTo(Component)
.final B
locationRelativeTo
(Component locationRelativeTo) final B
Sets the dialog owner as the parent window of the given component.final B
final B
final B
titleProvider
(ValueObserver<String> titleProvider)
-
Field Details
-
keyEventBuilders
-
owner
-
locationRelativeTo
-
location
-
titleProvider
-
icon
-
-
Constructor Details
-
AbstractDialogBuilder
public AbstractDialogBuilder()
-
-
Method Details
-
owner
- Specified by:
owner
in interfaceDialogBuilder<B extends DialogBuilder<B>>
- Parameters:
owner
- the dialog owner- Returns:
- this DialogBuilder instance
-
owner
Description copied from interface:DialogBuilder
Sets the dialog owner as the parent window of the given component. Also sets theDialogBuilder.locationRelativeTo(Component)
using the given component.- Specified by:
owner
in interfaceDialogBuilder<B extends DialogBuilder<B>>
- Parameters:
owner
- the dialog parent component- Returns:
- this builder instance
-
locationRelativeTo
- Specified by:
locationRelativeTo
in interfaceDialogBuilder<B extends DialogBuilder<B>>
- Parameters:
locationRelativeTo
- the component for the relative location- Returns:
- this builder instance
-
location
Description copied from interface:DialogBuilder
OverridesDialogBuilder.locationRelativeTo(Component)
.- Specified by:
location
in interfaceDialogBuilder<B extends DialogBuilder<B>>
- Parameters:
location
- the location of the dialog- Returns:
- this builder instance
-
title
- Specified by:
title
in interfaceDialogBuilder<B extends DialogBuilder<B>>
- Parameters:
title
- the dialog title- Returns:
- this builder instance
-
titleProvider
- Specified by:
titleProvider
in interfaceDialogBuilder<B extends DialogBuilder<B>>
- Parameters:
titleProvider
- a value observer for a dynamic dialog title- Returns:
- this builder instance
-
icon
- Specified by:
icon
in interfaceDialogBuilder<B extends DialogBuilder<B>>
- Parameters:
icon
- the dialog icon- Returns:
- this builder instance
-
keyEvent
Description copied from interface:DialogBuilder
Enables the key event defined by the givenKeyEvents.Builder
on the dialog root pane.- Specified by:
keyEvent
in interfaceDialogBuilder<B extends DialogBuilder<B>>
- Parameters:
keyEventBuilder
- a key event builder to enable on the dialog root pane- Returns:
- this builder instance
-