public class DialogOptions extends JavaScriptObject
| Modifier | Constructor and Description | 
|---|---|
protected  | 
DialogOptions()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addButton(String label)
Adds a custom button. 
 | 
void | 
addButton(String label,
         SimpleCallback callback)
Adds a custom button with a callback. 
 | 
void | 
addButton(String label,
         String className)
Adds a custom button with a class name. 
 | 
void | 
addButton(String label,
         String className,
         SimpleCallback callback)
Adds a custom button with a class name and a callback. 
 | 
static DialogOptions | 
newOptions(String message)
Creates a new  
DialogOptions. | 
void | 
setAnimate(boolean animate)
Animate the dialog in and out. 
Defaults to true. | 
void | 
setBackdrop(Boolean backdrop)
Whether the dialog should have a backdrop or not. 
 | 
void | 
setClassName(String className)
An additional class to apply to the dialog wrapper. 
Defaults to true. | 
void | 
setCloseButton(boolean closeButton)
Whether the dialog should have a close button or not. 
Defaults to true. | 
void | 
setLocale(BootboxLocale locale)
The locale settings used to translate the three standard button
 labels: OK, CONFIRM, CANCEL. 
 | 
void | 
setOnEscape(SimpleCallback callback)
Allows the user to dismiss the dialog by hitting
  
ESC, which will invoke this function.Defaults to null for custom dialogs. | 
void | 
setShow(boolean show)
Whether the dialog should be shown immediately. 
Defaults to true. | 
void | 
setSize(BootboxSize size)
Adds the relevant Bootstrap modal size class to the dialog wrapper. 
Defaults to null. | 
void | 
setTitle(String title)
Adds a header to the dialog and places this text in an H4. 
 | 
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toStringprotected DialogOptions()
public static DialogOptions newOptions(String message)
DialogOptions.message - public final void setTitle(String title)
title - public final void setLocale(BootboxLocale locale)
locale - public final void setOnEscape(SimpleCallback callback)
ESC, which will invoke this function.null for custom dialogs.callback - public final void setShow(boolean show)
true.show - public final void setBackdrop(Boolean backdrop)
null: The backdrop is displayed, but clicking on it has no effect.true: The backdrop is displayed, and clicking on it dismisses the dialog.false: The backdrop is not displayed.null.backdrop - public final void setCloseButton(boolean closeButton)
true.closeButton - public final void setAnimate(boolean animate)
true.animate - public final void setClassName(String className)
true.className - public final void setSize(BootboxSize size)
null.size - public final void addButton(String label, String className)
label - className - public final void addButton(String label, SimpleCallback callback)
label - callback - public final void addButton(String label, String className, SimpleCallback callback)
label - className - callback - Copyright © 2017. All rights reserved.