public class ConfirmDialog
extends com.vaadin.ui.Window
| Modifier and Type | Class and Description |
|---|---|
static class |
ConfirmDialog.ContentMode |
static interface |
ConfirmDialog.Factory |
static interface |
ConfirmDialog.Listener
Listener for dialog close events.
|
com.vaadin.ui.Window.CloseEvent, com.vaadin.ui.Window.CloseListener, com.vaadin.ui.Window.CloseShortcut, com.vaadin.ui.Window.ResizeEvent, com.vaadin.ui.Window.ResizeListener, com.vaadin.ui.Window.WindowModeChangeEvent, com.vaadin.ui.Window.WindowModeChangeListenercom.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusablecom.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListenercom.vaadin.server.Sizeable.Unitcom.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener| Modifier and Type | Field and Description |
|---|---|
static String |
CANCEL_ID |
static String |
DIALOG_ID |
static String |
MESSAGE_ID |
static String |
NOT_OK_ID |
static String |
OK_ID |
| Constructor and Description |
|---|
ConfirmDialog() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
formatDialogMessage(String text)
Format the messageLabel by maintaining text only.
|
com.vaadin.ui.Button |
getCancelButton() |
ConfirmDialog.ContentMode |
getContentMode() |
static ConfirmDialog.Factory |
getFactory()
Get the ConfirmDialog.Factory used to create and configure the dialog.
|
ConfirmDialog.Listener |
getListener() |
String |
getMessage() |
com.vaadin.ui.Button |
getOkButton() |
boolean |
isCanceled()
Did the user cancel the dialog.
|
boolean |
isConfirmed()
Did the user confirm the dialog.
|
protected void |
setCancelButton(com.vaadin.ui.Button cancelButton) |
protected void |
setConfirmed(boolean confirmed)
Set the isConfirmed state.
|
void |
setContentMode(ConfirmDialog.ContentMode contentMode) |
static void |
setFactory(ConfirmDialog.Factory newFactory)
Set the ConfirmDialog.Factory used to create and configure the dialog.
|
void |
setMessage(String message) |
protected void |
setMessageLabel(com.vaadin.ui.Label message) |
protected void |
setOkButton(com.vaadin.ui.Button okButton) |
static ConfirmDialog |
show(com.vaadin.ui.UI ui,
ConfirmDialog.Listener listener)
Show a modal ConfirmDialog in a window.
|
void |
show(com.vaadin.ui.UI ui,
ConfirmDialog.Listener listener,
boolean modal)
Show confirm dialog.
|
static ConfirmDialog |
show(com.vaadin.ui.UI ui,
String message,
ConfirmDialog.Listener listener)
Show a modal ConfirmDialog in a window.
|
static ConfirmDialog |
show(com.vaadin.ui.UI ui,
String windowCaption,
String message,
String okCaption,
String cancelCaption,
ConfirmDialog.Listener listener)
Show a modal ConfirmDialog in a window.
|
static ConfirmDialog |
show(com.vaadin.ui.UI ui,
String windowCaption,
String message,
String okCaption,
String cancelCaption,
Runnable r)
Shows a modal ConfirmDialog in given window and executes Runnable if OK
is chosen.
|
static ConfirmDialog |
show(com.vaadin.ui.UI ui,
String windowCaption,
String message,
String okCaption,
String cancelCaption,
String notOKCaption,
ConfirmDialog.Listener listener)
Show a modal three way (eg.
|
addBlurListener, addCloseListener, addFocusListener, addListener, addListener, addListener, addListener, addResizeListener, addWindowModeChangeListener, bringToFront, center, changeVariables, close, fireClose, fireResize, fireWindowWindowModeChange, focus, getAssistiveDescription, getAssistivePostfix, getAssistivePrefix, getAssistiveRole, getCustomAttributes, getPositionX, getPositionY, getState, getState, getTabStopBottomAssistiveText, getTabStopTopAssistiveText, getWindowMode, isClosable, isDraggable, isModal, isResizable, isResizeLazy, isTabStopEnabled, paintContent, readDesign, readDesignChildren, removeBlurListener, removeCloseListener, removeCloseShortcut, removeFocusListener, removeListener, removeListener, removeListener, removeListener, removeResizeListener, removeWindowModeChangeListener, setAssistiveDescription, setAssistivePostfix, setAssistivePrefix, setAssistiveRole, setClosable, setCloseShortcut, setDraggable, setModal, setParent, setPosition, setPositionX, setPositionY, setResizable, setResizeLazy, setTabStopBottomAssistiveText, setTabStopEnabled, setTabStopTopAssistiveText, setWindowMode, writeDesignaddAction, addActionHandler, addClickListener, addListener, getActionManager, getScrollLeft, getScrollTop, getTabIndex, removeAction, removeActionHandler, removeAllActionHandlers, removeClickListener, removeListener, setCaption, setScrollLeft, setScrollTop, setTabIndexaddComponentAttachListener, addComponentDetachListener, fireComponentAttachEvent, fireComponentDetachEvent, getComponentCount, getContent, iterator, removeComponentAttachListener, removeComponentDetachListener, removeFromParent, setContent, setHeight, setWidthaddListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isResponsive, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setPrimaryStyleName, setReadOnly, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResourceclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setPrimaryStyleName, setReadOnly, setStyleName, setVisibleaddAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedforEach, spliteratorpublic static final String DIALOG_ID
public static final String MESSAGE_ID
public static final String OK_ID
public static final String NOT_OK_ID
public static final String CANCEL_ID
public static ConfirmDialog.Factory getFactory()
DefaultConfirmDialogFactory is used.public static void setFactory(ConfirmDialog.Factory newFactory)
DefaultConfirmDialogFactory is used.newFactory - the ConfirmDialog factory to be usedpublic static ConfirmDialog show(com.vaadin.ui.UI ui, ConfirmDialog.Listener listener)
ui - the UI in which the dialog is to be showlistener - the listener to be notifiedpublic static ConfirmDialog show(com.vaadin.ui.UI ui, String message, ConfirmDialog.Listener listener)
ui - the UI in which the dialog is to be showmessage - the message shown in the dialoglistener - the listener to be notifiedpublic static ConfirmDialog show(com.vaadin.ui.UI ui, String windowCaption, String message, String okCaption, String cancelCaption, String notOKCaption, ConfirmDialog.Listener listener)
ui - UIwindowCaption - Caption for the confirmation dialog window.message - Message to display as window content.okCaption - Caption for the ok button.cancelCaption - Caption for cancel button.notOKCaption - Caption for notOK button.listener - Listener for dialog result.public static ConfirmDialog show(com.vaadin.ui.UI ui, String windowCaption, String message, String okCaption, String cancelCaption, ConfirmDialog.Listener listener)
ui - Main level UI.windowCaption - Caption for the confirmation dialog window.message - Message to display as window content.okCaption - Caption for the ok button.cancelCaption - Caption for cancel button.listener - Listener for dialog result.public static ConfirmDialog show(com.vaadin.ui.UI ui, String windowCaption, String message, String okCaption, String cancelCaption, Runnable r)
ui - Main level UI.windowCaption - Caption for the confirmation dialog window.message - Message to display as window content.okCaption - Caption for the ok button.cancelCaption - Caption for cancel button.r - Runnable to be run if confirmedpublic final void show(com.vaadin.ui.UI ui,
ConfirmDialog.Listener listener,
boolean modal)
ui - the UI in which the dialog should be shownlistener - the listener to be notifiedmodal - true if the dialog should be modalpublic final boolean isConfirmed()
public final boolean isCanceled()
public final ConfirmDialog.Listener getListener()
protected final void setOkButton(com.vaadin.ui.Button okButton)
public final com.vaadin.ui.Button getOkButton()
protected final void setCancelButton(com.vaadin.ui.Button cancelButton)
public final com.vaadin.ui.Button getCancelButton()
protected final void setMessageLabel(com.vaadin.ui.Label message)
public final void setMessage(String message)
public final String getMessage()
public final ConfirmDialog.ContentMode getContentMode()
public final void setContentMode(ConfirmDialog.ContentMode contentMode)
protected final String formatDialogMessage(String text)
text - the text to be formattedprotected final void setConfirmed(boolean confirmed)
confirmed - true if dialog was confirmedCopyright © 2015. All Rights Reserved.