public class MessageDialog extends Object implements HasOkHandlers, com.google.gwt.user.client.ui.HasAnimation, com.google.gwt.user.client.ui.IsWidget, OrientationChangeHandler, com.google.gwt.event.logical.shared.HasCloseHandlers<MessageDialog>, com.google.gwt.event.logical.shared.HasOpenHandlers<MessageDialog>
| Modifier and Type | Field and Description |
|---|---|
protected WidgetMessages |
messages |
| Constructor and Description |
|---|
MessageDialog()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<MessageDialog> handler) |
static void |
addDefaultCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<MessageDialog> defaultCloseHandler)
Add a default close handler that will be appended to each created object
|
static void |
addDefaultOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<MessageDialog> defaultOpenHandler)
Add a default open handler that will be appended to each created object
|
com.google.gwt.event.shared.HandlerRegistration |
addOkHandler(OkHandler handler)
Adds a handler for the OK button click event
|
com.google.gwt.event.shared.HandlerRegistration |
addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<MessageDialog> handler) |
com.google.gwt.user.client.ui.Widget |
asWidget() |
void |
fireEvent(com.google.gwt.event.shared.GwtEvent<?> event) |
String |
getDialogTitle()
Get the dialog box title
|
String |
getMessage()
Gets the message to be displayed to the user
|
String |
getTitle() |
void |
hide()
Hides the message dialog
|
boolean |
isAnimationEnabled() |
void |
onOrientationChange() |
void |
setAnimationEnabled(boolean animationEnabled) |
void |
setDialogTitle(String title)
Set the dialog box title
|
void |
setHeight(String height) |
void |
setMessage(com.google.gwt.safehtml.shared.SafeHtml message)
Sets the message to be displayed to the user
|
void |
setMessage(String message)
Sets the message to be displayed to the user
|
void |
setStyleName(String styleName) |
void |
setTitle(com.google.gwt.safehtml.shared.SafeHtml title) |
void |
setTitle(String title) |
void |
setWidth(String width) |
void |
show()
Show message dilaog.
|
static MessageDialog |
show(String title,
String message,
OkHandler okHandler)
Shows a message dialog
|
static MessageDialog |
show(String title,
String message,
OkHandler okHandler,
String styleName,
boolean animationEnabled)
Shows a message dialog
|
protected WidgetMessages messages
public String getDialogTitle()
public void setDialogTitle(String title)
title - public boolean isAnimationEnabled()
isAnimationEnabled in interface com.google.gwt.user.client.ui.HasAnimationHasAnimation.isAnimationEnabled()public String getMessage()
public void setMessage(com.google.gwt.safehtml.shared.SafeHtml message)
message - public void setMessage(String message)
message - public com.google.gwt.user.client.ui.Widget asWidget()
asWidget in interface com.google.gwt.user.client.ui.IsWidgetpublic void setStyleName(String styleName)
styleName - public void setWidth(String width)
width - public void setHeight(String height)
height - public void setTitle(com.google.gwt.safehtml.shared.SafeHtml title)
title - public void setTitle(String title)
title - public String getTitle()
public void setAnimationEnabled(boolean animationEnabled)
setAnimationEnabled in interface com.google.gwt.user.client.ui.HasAnimationHasAnimation.setAnimationEnabled(boolean)public com.google.gwt.event.shared.HandlerRegistration addOkHandler(OkHandler handler)
addOkHandler in interface HasOkHandlerspublic void show()
public void hide()
public static MessageDialog show(String title, String message, OkHandler okHandler)
title - the text to be displayed as the caption of the message boxmessage - the text to be displayed in the body of the message boxokHandler - a handler for the OK button click eventpublic static MessageDialog show(String title, String message, OkHandler okHandler, String styleName, boolean animationEnabled)
title - the text to be displayed as the caption of the message boxmessage - the text to be displayed in the body of the message boxokHandler - a handler for the OK button click eventstyleName - the name of the CSS class to be applied in the message box elementanimationEnabled - true to enable animations while showing or hiding the message boxpublic void fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
fireEvent in interface com.google.gwt.event.shared.HasHandlerspublic void onOrientationChange()
onOrientationChange in interface OrientationChangeHandlerpublic com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<MessageDialog> handler)
addCloseHandler in interface com.google.gwt.event.logical.shared.HasCloseHandlers<MessageDialog>public com.google.gwt.event.shared.HandlerRegistration addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<MessageDialog> handler)
addOpenHandler in interface com.google.gwt.event.logical.shared.HasOpenHandlers<MessageDialog>public static void addDefaultOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<MessageDialog> defaultOpenHandler)
defaultOpenHandler - public static void addDefaultCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<MessageDialog> defaultCloseHandler)
defaultCloseHandler - Copyright © 2014. All rights reserved.