Class CmsConfirmRemoveWidget

  • All Implemented Interfaces:
    com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget

    public class CmsConfirmRemoveWidget
    extends com.google.gwt.user.client.ui.Composite
    Widget for asking the user for confirmation whether a container page element should be removed.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CmsConfirmRemoveWidget.MessageStrings
      Interface with message string constants.
      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected CmsPushButton m_cancelButton
      The Cancel button.
      protected CmsCheckBox m_checkBox
      Checkbox for selecting whether the resource should be deleted.
      protected boolean m_hasDeleteCheckbox
      True if this dialog has a checkbox for deleting the resource.
      protected com.google.gwt.user.client.ui.Panel m_infoBoxContainer
      The widget containing the element info box.
      protected com.google.gwt.user.client.ui.Label m_mainLabel
      The label with the dialog text.
      protected com.google.gwt.user.client.ui.Label m_noReferenceLabel
      The label which appears when the user is given the option to delete the resource.
      protected CmsPushButton m_okButton
      The OK button.
      protected com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> m_removeCallback
      The callback which will be called when the user has confirmed or cancelled the element removal.
      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsConfirmRemoveWidget​(org.opencms.gwt.shared.CmsListInfoBean elementInfo, boolean canDelete, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> removeCallback)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<CmsPushButton> getButtons()
      Gets the buttons for the dialog.
      void onClickCancel​(com.google.gwt.event.dom.client.ClickEvent event)
      The click handler for the cancel button.
      void onClickOk​(com.google.gwt.event.dom.client.ClickEvent event)
      The click handler for the OK button.
      void onValueChange​(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.Boolean> event)
      Value change handler for the 'delete' checkbox.
      void setPopup​(CmsPopup popup)
      Sets the popup which this widget is used in.
      • Methods inherited from class com.google.gwt.user.client.ui.Composite

        claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class com.google.gwt.user.client.ui.UIObject

        addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • m_checkBox

        @UiField
        protected CmsCheckBox m_checkBox
        Checkbox for selecting whether the resource should be deleted.
      • m_hasDeleteCheckbox

        protected boolean m_hasDeleteCheckbox
        True if this dialog has a checkbox for deleting the resource.
      • m_infoBoxContainer

        @UiField
        protected com.google.gwt.user.client.ui.Panel m_infoBoxContainer
        The widget containing the element info box.
      • m_mainLabel

        @UiField
        protected com.google.gwt.user.client.ui.Label m_mainLabel
        The label with the dialog text.
      • m_noReferenceLabel

        @UiField
        protected com.google.gwt.user.client.ui.Label m_noReferenceLabel
        The label which appears when the user is given the option to delete the resource.
      • m_removeCallback

        protected com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> m_removeCallback
        The callback which will be called when the user has confirmed or cancelled the element removal.

    • Constructor Detail

      • CmsConfirmRemoveWidget

        public CmsConfirmRemoveWidget​(org.opencms.gwt.shared.CmsListInfoBean elementInfo,
                                      boolean canDelete,
                                      com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> removeCallback)
        Creates a new instance.

        Parameters:
        elementInfo - the element info bean
        canDelete - true if the user should be given the option to delete the resource
        removeCallback - the callback to execute after the dialog closes
    • Method Detail

      • getButtons

        public java.util.List<CmsPushButtongetButtons()
        Gets the buttons for the dialog.

        Returns:
        the buttons for the dialog
      • onClickCancel

        @UiHandler("m_cancelButton")
        public void onClickCancel​(com.google.gwt.event.dom.client.ClickEvent event)
        The click handler for the cancel button.

        Parameters:
        event - the click event
      • onClickOk

        @UiHandler("m_okButton")
        public void onClickOk​(com.google.gwt.event.dom.client.ClickEvent event)
        The click handler for the OK button.

        Parameters:
        event - the click event
      • onValueChange

        @UiHandler("m_checkBox")
        public void onValueChange​(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.Boolean> event)
        Value change handler for the 'delete' checkbox.

        Parameters:
        event - the value change event
      • setPopup

        public void setPopup​(CmsPopup popup)
        Sets the popup which this widget is used in.

        Parameters:
        popup - the popup