public class MultiLinePromptMessageBox extends AbstractInputMessageBox
A message box that prompts for input with a multiple line text area and OK and CANCEL buttons.
Code snippet:
MultiLinePromptMessageBox mb = new MultiLinePromptMessageBox("Description", "Please enter a brief description");
mb.addDialogHideHandler(new DialogHideHandler() {
@Override
public void onDialogHide(DialogHideEvent event) {
if (event.getHideButton() == PredefinedButton.OK) {
// perform OK action
} else if (event.getHideButton() == PredefinedButton.CANCEL) {
// perform CANCEL action
}
}
});
mb.setWidth(300);
mb.show();
MessageBox.MessageBoxAppearance, MessageBox.MessageBoxIcons
Dialog.DialogMessages, Dialog.PredefinedButton
Window.WindowAppearance, Window.WindowMessages
ContentPanel.ContentPanelAppearance, ContentPanel.ContentPanelMessages, ContentPanel.PanelHeaderAppearance
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
HasWidgets.ForIsWidget
IndexedPanel.ForIsWidget
ICONS
DEBUG_ID_PREFIX
Constructor and Description |
---|
MultiLinePromptMessageBox(SafeHtml titleHtml,
SafeHtml messageHtml)
Creates a message box that prompts for input with a multiple line text area
and OK and CANCEL buttons.
|
MultiLinePromptMessageBox(SafeHtml title,
SafeHtml message,
Window.WindowAppearance windowAppearance,
MessageBox.MessageBoxAppearance messageBoxAppearance)
Creates a message box that prompts for input with a multiple line text area
and OK and CANCEL buttons.
|
MultiLinePromptMessageBox(String titleText,
String messageText)
Creates a messageText box that prompts for input with a multiple line text area
and OK and CANCEL buttons.
|
Modifier and Type | Method and Description |
---|---|
TextArea |
getTextArea()
Returns the multiple line text area.
|
getField, getValue
getIcon, getMessageBoxAppearance, setIcon, setMessage, setMessage, show
addDialogHideHandler, getButton, getDialogMessages, getPredefinedButton, getPredefinedButtons, hide, isHideOnButtonClick, setDialogMessages, setHideOnButtonClick, setPredefinedButtons
addActivateHandler, addDeactivateHandler, addMaximizeHandler, addMinimizeHandler, addRestoreHandler, alignTo, center, focus, getAppearance, getConstrain, getContainer, getDraggable, getFocusWidget, getMinHeight, getMinWidth, getResizable, isAutoHide, isBlinkModal, isClosable, isDraggable, isMaximizable, isMaximized, isMinimizable, isModal, isOnEsc, isResizable, maximize, minimize, onBrowserEvent, restore, setActive, setAutoHide, setBlinkModal, setClosable, setConstrain, setContainer, setDraggable, setFocusWidget, setMaximizable, setMinHeight, setMinimizable, setMinWidth, setModal, setOnEsc, setPagePosition, setPosition, setResizable, setWindowMessages, setZIndex, toBack, toFront
addBeforeCollapseHandler, addBeforeExpandHandler, addButton, addCollapseHandler, addExpandHandler, addTool, collapse, expand, forceLayout, getAnimationDuration, getBody, getButtonAlign, getButtonBar, getHeader, getHeading, getMessages, getMinButtonWidth, isAnimCollapse, isCollapsed, isCollapsible, isExpanded, isHideCollapseTool, isTitleCollapse, setAnimationDuration, setAnimCollapse, setBodyBorder, setBodyStyle, setBodyStyleName, setButtonAlign, setCollapsible, setExpanded, setHeaderVisible, setHeading, setHeading, setHideCollapseTool, setMessages, setMinButtonWidth, setTitleCollapse
add, add, getWidget, isResize, setResize, setWidget, setWidget
isLayoutRunning, isOrWasLayoutRunning, onResize
add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, clear, disable, enable, findWidget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove, remove, remove
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addGestureRecognizer, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disableEvents, enableEvents, fireEvent, getData, getElement, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPixelSize, setShadow, setShadowPosition, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, sync, syncSize, unmask
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString
public MultiLinePromptMessageBox(String titleText, String messageText)
titleText
- the titleText of the messageText boxmessageText
- the messageText that appears in the messageText boxpublic MultiLinePromptMessageBox(SafeHtml titleHtml, SafeHtml messageHtml)
titleHtml
- the title of the message boxmessageHtml
- the message that appears in the message boxpublic MultiLinePromptMessageBox(SafeHtml title, SafeHtml message, Window.WindowAppearance windowAppearance, MessageBox.MessageBoxAppearance messageBoxAppearance)
title
- the title of the message boxmessage
- the message that appears in the message boxwindowAppearance
- the message box window windowAppearancemessageBoxAppearance
- the message box content windowAppearancepublic TextArea getTextArea()
Copyright © 2016. All rights reserved.