public abstract class AlertBase extends HtmlWidget implements IsAnimated, HasCloseHandlers<AlertBase>, HasType<AlertType>
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Constructor and Description |
|---|
AlertBase()
Initializes an Alert with a close icon.
|
AlertBase(AlertType type)
Initializes an Alert of given Type with a close icon.
|
AlertBase(String html)
Initializes an Alert with a inner HTML.
|
AlertBase(String html,
boolean hasClose)
Initializes an Alert with an optional close icon.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addClosedHandler(ClosedHandler<AlertBase> handler)
Adds a
ClosedHandler to the widget. |
com.google.gwt.event.shared.HandlerRegistration |
addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<AlertBase> handler) |
void |
clear()
Delete the whole content of the Alert.
|
void |
close()
Close this alert.
|
boolean |
getAnimation()
Gets whether the widget is animated.
|
protected com.google.gwt.user.client.ui.HasWidgets |
getHeadingContainer()
Gets heading's container widget
|
String |
getHTML() |
String |
getText() |
boolean |
hasClose()
has Close
|
protected void |
onAttach() |
protected void |
onClose()
This method is called immediately when the widget's close method is
executed.
|
protected void |
onClosed()
This method is called once the widget is completely closed.
|
void |
setAnimation(boolean animated)
Sets whether the Alert should be animated.
|
void |
setClose(boolean hasClose)
Sets whether the Alert has a close icon or not.
|
void |
setHeading(String text)
Sets the text of an optional heading.
|
void |
setHTML(String html) |
void |
setText(String text) |
void |
setType(AlertType type)
Sets the type of the Alert.
|
addStyle, removeStyle, setHideOn, setShowOn, setStyleadd, add, add, addAndReplaceElement, addAndReplaceElement, addAndReplaceElement, addAndReplaceElement, createUniqueId, getElementById, wrapadjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeadd, adopt, adopt, disown, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, setParent, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEventspublic AlertBase()
public AlertBase(String html)
html - inner HTMLpublic AlertBase(String html, boolean hasClose)
html - inner HTMLhasClose - whether the Alert should have a close icon.public AlertBase(AlertType type)
type - of the Alertpublic void setClose(boolean hasClose)
hasClose - false if you don't want to have a close icon.
Default: trueprotected void onAttach()
onAttach in class com.google.gwt.user.client.ui.Widgetpublic boolean hasClose()
protected com.google.gwt.user.client.ui.HasWidgets getHeadingContainer()
protected void onClose()
protected void onClosed()
public void setType(AlertType type)
public void setHeading(String text)
text - the new headingpublic void setAnimation(boolean animated)
setAnimation in interface IsAnimatedanimated - true if the Alert should fade out. Default:
falsepublic boolean getAnimation()
getAnimation in interface IsAnimatedtrue if the widget is animatedpublic void clear()
clear in interface com.google.gwt.user.client.ui.HasWidgetsclear in class com.google.gwt.user.client.ui.Panelpublic String getText()
public void setText(String text)
public String getHTML()
public void setHTML(String html)
public void close()
public com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<AlertBase> handler)
addCloseHandler in interface com.google.gwt.event.logical.shared.HasCloseHandlers<AlertBase>public com.google.gwt.event.shared.HandlerRegistration addClosedHandler(ClosedHandler<AlertBase> handler)
ClosedHandler to the widget.handler - the handlerHandlerRegistration used to remove this handlerCopyright © 2016. All rights reserved.