Module com.googlecode.lanterna
Class AbstractDialogBuilder<B,T extends DialogWindow>
java.lang.Object
com.googlecode.lanterna.gui2.dialogs.AbstractDialogBuilder<B,T>
- Type Parameters:
B
- The real type of the builder classT
- Type of dialog this builder is building
- Direct Known Subclasses:
ActionListDialogBuilder
,DirectoryDialogBuilder
,FileDialogBuilder
,ListSelectDialogBuilder
,TextInputDialogBuilder
Abstract class for dialog building, containing much shared code between different kinds of dialogs
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDialogBuilder
(String title) Default constructor for a dialog builder -
Method Summary
Modifier and TypeMethodDescriptionfinal T
build()
Builds a new dialog following the specifications of this builderprotected abstract T
Builds the dialog according to the builder implementationReturns the description that the built dialog will haveReturns the list of extra window hints that will be assigned to the window when builtgetTitle()
Returns the title that the built dialog will haveprotected abstract B
self()
Helper method for casting this totype
parameterB
setDescription
(String description) Changes the description of the dialogsetExtraWindowHints
(Set<Window.Hint> extraWindowHints) Assigns a set of extra window hints that you want the built dialog to haveChanges the title of the dialog
-
Field Details
-
title
-
description
-
extraWindowHints
-
-
Constructor Details
-
AbstractDialogBuilder
Default constructor for a dialog builder- Parameters:
title
- Title to assign to the dialog
-
-
Method Details
-
setTitle
Changes the title of the dialog- Parameters:
title
- New title- Returns:
- Itself
-
getTitle
Returns the title that the built dialog will have- Returns:
- Title that the built dialog will have
-
setDescription
Changes the description of the dialog- Parameters:
description
- New description- Returns:
- Itself
-
getDescription
Returns the description that the built dialog will have- Returns:
- Description that the built dialog will have
-
setExtraWindowHints
Assigns a set of extra window hints that you want the built dialog to have- Parameters:
extraWindowHints
- Window hints to assign to the window in addition to the ones the builder will put- Returns:
- Itself
-
getExtraWindowHints
Returns the list of extra window hints that will be assigned to the window when built- Returns:
- List of extra window hints that will be assigned to the window when built
-
self
Helper method for casting this totype
parameterB
- Returns:
this
asB
-
buildDialog
Builds the dialog according to the builder implementation- Returns:
- New dialog object
-
build
Builds a new dialog following the specifications of this builder- Returns:
- New dialog built following the specifications of this builder
-