public abstract class AlertBase extends HtmlWidget implements IsAnimated, HasCloseHandlers<AlertBase>, HasType<AlertType>
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledIndexedPanel.ForIsWidgetHasWidgets.ForIsWidgetDEBUG_ID_PREFIX| 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 |
|---|---|
HandlerRegistration |
addClosedHandler(ClosedHandler<AlertBase> handler)
Adds a
ClosedHandler to the widget. |
HandlerRegistration |
addCloseHandler(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 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, addAndReplaceElement, createUniqueId, getElementById, wrapadd, adjustIndex, 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, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEventsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfireEventpublic 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 void setClose(boolean hasClose)
hasClose - false if you don't want to have a close icon.
Default: truepublic boolean hasClose()
protected HasWidgets getHeadingContainer()
protected void onClose()
protected void onClosed()
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 HasWidgetsclear in class Panelpublic void close()
public HandlerRegistration addCloseHandler(CloseHandler<AlertBase> handler)
addCloseHandler in interface HasCloseHandlers<AlertBase>public HandlerRegistration addClosedHandler(ClosedHandler<AlertBase> handler)
ClosedHandler to the widget.handler - the handlerHandlerRegistration used to remove this handlerCopyright © 2012-2014 gwtbootstrap. All Rights Reserved.