Module com.googlecode.lanterna
Class MessageDialogBuilder
java.lang.Object
com.googlecode.lanterna.gui2.dialogs.MessageDialogBuilder
Dialog builder for the
MessageDialog
class, use this to create instances of that class and to customize
them-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<MessageDialogButton> private final Set
<Window.Hint> private String
private String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddButton
(MessageDialogButton button) Adds a button to the dialogbuild()
Builds a newMessageDialog
from the properties in the buildersetExtraWindowHints
(Collection<Window.Hint> extraWindowHints) Assigns a set of extra window hints that you want the built dialog to haveSets the main text of theMessageDialog
Sets the title of theMessageDialog
-
Field Details
-
title
-
text
-
buttons
-
extraWindowHints
-
-
Constructor Details
-
MessageDialogBuilder
public MessageDialogBuilder()Default constructor
-
-
Method Details
-
build
Builds a newMessageDialog
from the properties in the builder- Returns:
- Newly build
MessageDialog
-
setTitle
Sets the title of theMessageDialog
- Parameters:
title
- New title of the message dialog- Returns:
- Itself
-
setText
Sets the main text of theMessageDialog
- Parameters:
text
- Main text of theMessageDialog
- Returns:
- Itself
-
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
-
addButton
Adds a button to the dialog- Parameters:
button
- Button to add to the dialog- Returns:
- Itself
-