com.sencha.gxt.widget.core.client.box
Class MessageBox

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sencha.gxt.widget.core.client.Component
              extended by com.sencha.gxt.widget.core.client.container.Container
                  extended by com.sencha.gxt.widget.core.client.container.ResizeContainer
                      extended by com.sencha.gxt.widget.core.client.container.SimpleContainer
                          extended by com.sencha.gxt.widget.core.client.ContentPanel
                              extended by com.sencha.gxt.widget.core.client.Window
                                  extended by com.sencha.gxt.widget.core.client.Dialog
                                      extended by com.sencha.gxt.widget.core.client.box.MessageBox
All Implemented Interfaces:
HasAttachHandlers, HasResizeHandlers, HasHandlers, EventListener, AcceptsOneWidget, HasOneWidget, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, IsWidget, ProvidesResize, RequiresResize, Collapsible, HasLayout, ActivateEvent.HasActivateHandlers<Window>, AddEvent.HasAddHandlers, BeforeAddEvent.HasBeforeAddHandlers, BeforeCollapseEvent.HasBeforeCollapseHandlers, BeforeExpandEvent.HasBeforeExpandHandlers, BeforeHideEvent.HasBeforeHideHandlers, BeforeRemoveEvent.HasBeforeRemoveHandlers, BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler, BeforeShowEvent.HasBeforeShowHandlers, BlurEvent.HasBlurHandlers, CollapseEvent.HasCollapseHandlers, ContainerHandler.HasContainerHandlers, DeactivateEvent.HasDeactivateHandlers<Window>, DisableEvent.HasDisableHandlers, EnableEvent.HasEnableHandlers, ExpandEvent.HasExpandHandlers, FocusEvent.HasFocusHandlers, HideEvent.HasHideHandlers, MaximizeEvent.HasMaximizeHandlers, MinimizeEvent.HasMinimizeHandlers, MoveEvent.HasMoveHandlers, RemoveEvent.HasRemoveHandlers, RestoreEvent.HasRestoreHandlers, ShowContextMenuEvent.HasShowContextMenuHandler, ShowEvent.HasShowHandlers, HasFocusSupport, HasIcon, HasItemId, Iterable<Widget>
Direct Known Subclasses:
AbstractInputMessageBox, AlertMessageBox, AutoProgressMessageBox, ConfirmMessageBox, ProgressMessageBox

public class MessageBox
extends Dialog
implements HasIcon

Custom Dialog for displaying information to the user.

Note that the MessageBox is asynchronous. Unlike a regular JavaScript alert (which will halt browser execution), showing a MessageBox will not cause the code to stop.


Nested Class Summary
static interface MessageBox.MessageBoxAppearance
           
static interface MessageBox.MessageBoxIcons
           
 
Nested classes/interfaces inherited from class com.sencha.gxt.widget.core.client.Dialog
Dialog.DialogMessages, Dialog.PredefinedButton
 
Nested classes/interfaces inherited from class com.sencha.gxt.widget.core.client.Window
Window.WindowAppearance, Window.WindowMessages
 
Nested classes/interfaces inherited from class com.sencha.gxt.widget.core.client.ContentPanel
ContentPanel.ContentPanelAppearance, ContentPanel.ContentPanelMessages, ContentPanel.PanelHeaderAppearance
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
HasWidgets.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
IndexedPanel.ForIsWidget
 
Field Summary
static MessageBox.MessageBoxIcons ICONS
          The basic icons used to decorate the message box.
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
MessageBox(SafeHtml headingHtml)
          Creates a message box with the specified heading HTML.
MessageBox(SafeHtml headingHtml, SafeHtml messageHtml)
          Creates a message box with the default message box appearance and the specified heading and message HTML.
MessageBox(SafeHtml headingHtml, SafeHtml messageHtml, Window.WindowAppearance appearance, MessageBox.MessageBoxAppearance contentAppearance)
          Creates a message box with the specified heading HTML, message HTML and appearance.
MessageBox(String headingHtml)
          Creates a message box with the specified heading HTML.
MessageBox(String headingHtml, String messageHtml)
          Creates a message box with the specified heading and message HTML.
MessageBox(String headingHtml, String messageHtml, Window.WindowAppearance appearance, MessageBox.MessageBoxAppearance contentAppearance)
          Creates a message box with the specified heading HTML, message HTML and appearance.
 
Method Summary
 ImageResource getIcon()
          Returns the icon.
 void setIcon(ImageResource icon)
          Sets the icon.
 void setMessage(String message)
          Sets the message.
 
Methods inherited from class com.sencha.gxt.widget.core.client.Dialog
getButtonById, getDialogMessages, getPredefinedButtons, isHideOnButtonClick, setDialogMessages, setHideOnButtonClick, setPredefinedButtons
 
Methods inherited from class com.sencha.gxt.widget.core.client.Window
addActivateHandler, addDeactivateHandler, addMaximizeHandler, addMinimizeHandler, addRestoreHandler, alignTo, center, focus, getConstrain, getContainer, getDraggable, getFocusWidget, getHideButton, getMinHeight, getMinWidth, getResizable, hide, hide, 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, show, toBack, toFront
 
Methods inherited from class com.sencha.gxt.widget.core.client.ContentPanel
addBeforeCollapseHandler, addBeforeExpandHandler, addButton, addCollapseHandler, addExpandHandler, addTool, collapse, expand, getAnimationDuration, getBody, getButtonAlign, getButtonBar, getHeader, getHTML, getMessages, getMinButtonWidth, getText, isAnimCollapse, isCollapsed, isCollapsible, isExpanded, isHideCollapseTool, isTitleCollapse, setAnimationDuration, setAnimCollapse, setBodyBorder, setBodyStyle, setBodyStyleName, setButtonAlign, setCollapsible, setExpanded, setHeaderVisible, setHeadingHtml, setHeadingHtml, setHeadingText, setHideCollapseTool, setMessages, setMinButtonWidth, setTitleCollapse
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.SimpleContainer
add, add, getWidget, isResize, setResize, setWidget, setWidget
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.ResizeContainer
forceLayout, isLayoutRunning, isOrWasLayoutRunning, onResize
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.Container
add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, clear, disable, enable, findWidget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove, remove, remove
 
Methods inherited from class com.sencha.gxt.widget.core.client.Component
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disableEvents, enableEvents, fireEvent, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getStateId, 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, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, sync, syncSize, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ICONS

public static MessageBox.MessageBoxIcons ICONS
The basic icons used to decorate the message box.

Constructor Detail

MessageBox

public MessageBox(SafeHtml headingHtml)
Creates a message box with the specified heading HTML.

Parameters:
headingHtml - the HTML to display for the message box heading

MessageBox

public MessageBox(SafeHtml headingHtml,
                  SafeHtml messageHtml)
Creates a message box with the default message box appearance and the specified heading and message HTML.

Parameters:
headingHtml - the HTML to display for the message box heading
messageHtml - the HTML to display in the message box

MessageBox

public MessageBox(SafeHtml headingHtml,
                  SafeHtml messageHtml,
                  Window.WindowAppearance appearance,
                  MessageBox.MessageBoxAppearance contentAppearance)
Creates a message box with the specified heading HTML, message HTML and appearance.

Parameters:
headingHtml - the HTML to display for the message box heading
messageHtml - the HTML to display in the message box
appearance - the message box window appearance
contentAppearance - the message box content appearance

MessageBox

public MessageBox(String headingHtml)
Creates a message box with the specified heading HTML. It is the caller's responsibility to ensure the HTML is CSS safe.

Parameters:
headingHtml - the HTML to display for the message box heading.

MessageBox

public MessageBox(String headingHtml,
                  String messageHtml)
Creates a message box with the specified heading and message HTML. It is the caller's responsibility to ensure the HTML is CSS safe.

Parameters:
headingHtml - the HTML to display for the message box heading
messageHtml - the HTML to display in the message box

MessageBox

public MessageBox(String headingHtml,
                  String messageHtml,
                  Window.WindowAppearance appearance,
                  MessageBox.MessageBoxAppearance contentAppearance)
Creates a message box with the specified heading HTML, message HTML and appearance. It is the caller's responsibility to ensure the HTML is CSS safe.

Parameters:
headingHtml - the HTML to display for the message box heading
messageHtml - the HTML to display in the message box
appearance - the message box window appearance
contentAppearance - the message box content appearance
Method Detail

getIcon

public ImageResource getIcon()
Description copied from interface: HasIcon
Returns the icon.

Specified by:
getIcon in interface HasIcon
Returns:
the icon

setIcon

public void setIcon(ImageResource icon)
Description copied from interface: HasIcon
Sets the icon.

Specified by:
setIcon in interface HasIcon
Parameters:
icon - the icon

setMessage

public void setMessage(String message)
Sets the message.

Parameters:
message - the message


Copyright © 2012. All Rights Reserved.