Class CmsConfirmRemoveWidget
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Composite
-
- org.opencms.ade.containerpage.client.ui.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.
-
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.
-
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
-
-
-
-
Field Detail
-
m_cancelButton
@UiField protected CmsPushButton m_cancelButton
The Cancel button.
-
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_okButton
@UiField protected CmsPushButton m_okButton
The OK button.
-
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 beancanDelete
- true if the user should be given the option to delete the resourceremoveCallback
- the callback to execute after the dialog closes
-
-
Method Detail
-
getButtons
public java.util.List<CmsPushButton> getButtons()
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
-
-