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, 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
  • Constructor Details

    • CmsAlertDialog

      public CmsAlertDialog()
      Constructor.

    • CmsAlertDialog

      public CmsAlertDialog(String title, String content)
      Constructor.

      Parameters:
      title - the title and heading of the dialog
      content - the content text
    • CmsAlertDialog

      public CmsAlertDialog(String title, String content, String buttonText)
      Constructor.

      Parameters:
      title - the title and heading of the dialog
      content - the content text
      buttonText - the button text
    • CmsAlertDialog

      public CmsAlertDialog(String title, String content, String buttonText, String buttonIconClass)
      Constructor.

      Parameters:
      title - the title and heading of the dialog
      content - the content text
      buttonText - the button text
      buttonIconClass - the button icon class
  • Method Details

    • 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 class CmsPopup
      See Also:
    • getCloseButton

      Returns the button widget.

      Returns:
      the button
    • setCloseIconClass

      public void setCloseIconClass(String iconClass)
      Sets the cancel/close button icon class.

      Parameters:
      iconClass - the icon class
    • setCloseText

      public void setCloseText(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(String warningText)
      Sets the warning text (HTML possible).

      Parameters:
      warningText - the warning text to set
    • show

      public void show()
      Overrides:
      show in class CmsPopup
      See Also:
    • 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.