B
- The real type of the builder classT
- Type of dialog this builder is buildingActionListDialogBuilder
, FileDialogBuilder
, ListSelectDialogBuilder
, TextInputDialogBuilder
public abstract class AbstractDialogBuilder<B,T extends DialogWindow> extends Object
Modifier and Type | Field | Description |
---|---|---|
protected String |
description |
|
protected Set<Window.Hint> |
extraWindowHints |
|
protected String |
title |
Constructor | Description |
---|---|
AbstractDialogBuilder(String title) |
Default constructor for a dialog builder
|
Modifier and Type | Method | Description |
---|---|---|
T |
build() |
Builds a new dialog following the specifications of this builder
|
protected abstract T |
buildDialog() |
Builds the dialog according to the builder implementation
|
String |
getDescription() |
Returns the description that the built dialog will have
|
Set<Window.Hint> |
getExtraWindowHints() |
Returns the list of extra window hints that will be assigned to the window when built
|
String |
getTitle() |
Returns the title that the built dialog will have
|
protected abstract B |
self() |
Helper method for casting this to
type parameter B |
B |
setDescription(String description) |
Changes the description of the dialog
|
B |
setExtraWindowHints(Set<Window.Hint> extraWindowHints) |
Assigns a set of extra window hints that you want the built dialog to have
|
B |
setTitle(String title) |
Changes the title of the dialog
|
protected String title
protected String description
protected Set<Window.Hint> extraWindowHints
public AbstractDialogBuilder(String title)
title
- Title to assign to the dialogpublic B setTitle(String title)
title
- New titlepublic String getTitle()
public B setDescription(String description)
description
- New descriptionpublic String getDescription()
public B setExtraWindowHints(Set<Window.Hint> extraWindowHints)
extraWindowHints
- Window hints to assign to the window in addition to the ones the builder will putpublic Set<Window.Hint> getExtraWindowHints()
protected abstract B self()
type
parameter B
this
as B
protected abstract T buildDialog()
public final T build()
Copyright © 2020. All rights reserved.