Package org.opencms.gwt.client.ui
Class CmsAlertDialog
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- com.google.gwt.user.client.ui.PopupPanel
-
- org.opencms.gwt.client.ui.CmsPopup
-
- org.opencms.gwt.client.ui.CmsAlertDialog
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.EventPreview
,com.google.gwt.user.client.ui.AcceptsOneWidget
,com.google.gwt.user.client.ui.HasAnimation
,com.google.gwt.user.client.ui.HasOneWidget
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,com.google.gwt.user.client.ui.SourcesPopupEvents
,java.lang.Iterable<com.google.gwt.user.client.ui.Widget>
,I_CmsAutoHider
- Direct Known Subclasses:
CmsAcceptDeclineCancelDialog
,CmsConfirmDialog
public class CmsAlertDialog extends CmsPopup
Provides an alert dialog with a button.- Since:
- 8.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.gwt.client.ui.CmsPopup
CmsPopup.HistoryHandler
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.AnimationType, com.google.gwt.user.client.ui.PopupPanel.PositionCallback
-
-
Field Summary
-
Fields inherited from class org.opencms.gwt.client.ui.CmsPopup
DEFAULT_WIDTH, m_closeCommand, m_notificationWidgetInstalled, m_windowWidth, WIDE_WIDTH
-
-
Constructor Summary
Constructors Constructor Description CmsAlertDialog()
Constructor.CmsAlertDialog(java.lang.String title, java.lang.String content)
Constructor.CmsAlertDialog(java.lang.String title, java.lang.String content, java.lang.String buttonText)
Constructor.CmsAlertDialog(java.lang.String title, java.lang.String content, java.lang.String buttonText, java.lang.String buttonIconClass)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBottomWidget(com.google.gwt.user.client.ui.Widget w)
Adds a widget to this dialogs bottom content.void
addTopWidget(com.google.gwt.user.client.ui.Widget w)
Adds a widget to this dialogs top content.void
center()
CmsPushButton
getCloseButton()
Returns the button widget.protected I_CmsCloseDialogHandler
getHandler()
Returns the dialog handler.protected com.google.gwt.user.client.ui.FlowPanel
getTopWidgets()
Returns the top widgets panel.protected void
onClose()
Executed on 'close' click.protected void
onShow()
Executed when the dialog is shown.void
setCloseIconClass(java.lang.String iconClass)
Sets the cancel/close button icon class.void
setCloseText(java.lang.String text)
Sets the close button text.void
setHandler(I_CmsCloseDialogHandler handler)
Sets the dialog handler.void
setWarningMessage(java.lang.String warningText)
Sets the warning text (HTML possible).void
show()
-
Methods inherited from class org.opencms.gwt.client.ui.CmsPopup
add, add, addButton, addButton, addDialogClose, adjustIndex, beginDragging, catchNotifications, centerHorizontally, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, clear, continueDragging, createDialogNotificationWidget, doAttachChildren, doDetachChildren, endDragging, getAvailableHeight, getCaption, getChildren, getContainerElement, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, getWidth, hasCaption, hide, hide, insert, insert, insertFront, installNotificationWidget, iterator, onBrowserEvent, onDetach, onPreviewNativeEvent, remove, remove, removeAllButtons, removeButton, removePadding, setBackgroundColor, setCaption, setHeight, setHeight, setMainContent, setPixelSize, setPositionFixed, setSize, setSpecialBackgroundClass, setUseAnimation, setWidget, setWidth, setWidth, showArrow, wrapWithBorderPadding
-
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, getAnimationType, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAnimationType, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, showRelativeTo
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onLoad, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opencms.gwt.client.ui.I_CmsAutoHider
addAutoHidePartner, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, removeAutoHidePartner, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled
-
-
-
-
Constructor Detail
-
CmsAlertDialog
public CmsAlertDialog()
Constructor.
-
CmsAlertDialog
public CmsAlertDialog(java.lang.String title, java.lang.String content)
Constructor.- Parameters:
title
- the title and heading of the dialogcontent
- the content text
-
CmsAlertDialog
public CmsAlertDialog(java.lang.String title, java.lang.String content, java.lang.String buttonText)
Constructor.- Parameters:
title
- the title and heading of the dialogcontent
- the content textbuttonText
- the button text
-
CmsAlertDialog
public CmsAlertDialog(java.lang.String title, java.lang.String content, java.lang.String buttonText, java.lang.String buttonIconClass)
Constructor.- Parameters:
title
- the title and heading of the dialogcontent
- the content textbuttonText
- the button textbuttonIconClass
- the button icon class
-
-
Method Detail
-
addBottomWidget
public void addBottomWidget(com.google.gwt.user.client.ui.Widget w)
Adds a widget to this dialogs bottom content.- Parameters:
w
- the widget to add
-
addTopWidget
public void addTopWidget(com.google.gwt.user.client.ui.Widget w)
Adds a widget to this dialogs top content.- Parameters:
w
- the widget to add
-
center
public void center()
- Overrides:
center
in classCmsPopup
- See Also:
CmsPopup.center()
-
getCloseButton
public CmsPushButton getCloseButton()
Returns the button widget.- Returns:
- the button
-
setCloseIconClass
public void setCloseIconClass(java.lang.String iconClass)
Sets the cancel/close button icon class.- Parameters:
iconClass
- the icon class
-
setCloseText
public void setCloseText(java.lang.String text)
Sets the close button text.- Parameters:
text
- the button text
-
setHandler
public void setHandler(I_CmsCloseDialogHandler handler)
Sets the dialog handler.- Parameters:
handler
- the handler to set
-
setWarningMessage
public void setWarningMessage(java.lang.String warningText)
Sets the warning text (HTML possible).- Parameters:
warningText
- the warning text to set
-
show
public void show()
- Overrides:
show
in classCmsPopup
- See Also:
CmsPopup.show()
-
getHandler
protected I_CmsCloseDialogHandler getHandler()
Returns the dialog handler.- Returns:
- the dialog handler
-
getTopWidgets
protected com.google.gwt.user.client.ui.FlowPanel getTopWidgets()
Returns the top widgets panel.- Returns:
- the top widgets panel
-
onClose
protected void onClose()
Executed on 'close' click.
-
onShow
protected void onShow()
Executed when the dialog is shown.
-
-