Class A_CmsPreviewDialog<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
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.galleries.client.preview.ui.A_CmsPreviewDialog<T>
- Type Parameters:
T
- the resource info bean type
- 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
- Direct Known Subclasses:
CmsBinaryPreviewDialog
,CmsImagePreviewDialog
public abstract class A_CmsPreviewDialog<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
extends com.google.gwt.user.client.ui.Composite
Provides a widget skeleton for the preview dialog.
This widget contains a panel with the resource preview and a set of tabs with resource information under the preview panel.
- Since:
- 8.0.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
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
Modifier and TypeFieldDescriptionprotected com.google.gwt.user.client.ui.FlowPanel
The button panel.protected CmsPushButton
The select button.protected int
The dialog height.protected int
The dialog width.protected org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode
The dialog mode of the gallery.protected com.google.gwt.user.client.ui.FlowPanel
The parent panel of the preview dialog.protected int
The preview height.protected com.google.gwt.user.client.ui.FlowPanel
The preview placeholder panel.protected com.google.gwt.user.client.ui.SimplePanel
The preview panel of preview dialog.protected CmsPushButton
The select button.protected CmsTabbedPanel<com.google.gwt.user.client.ui.Widget>
The tabbed panel of the preview dialog.protected com.google.gwt.user.client.ui.FlowPanel
The tabs placeholder panel.protected com.google.gwt.user.client.ui.Label
The title label.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorDescriptionA_CmsPreviewDialog
(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode dialogMode, int dialogHeight, int dialogWidth, boolean disableSelection) The constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
confirmSaveChanges
(String message, com.google.gwt.user.client.Command onConfirm, com.google.gwt.user.client.Command onCancel) Displays a confirm save changes dialog with the given message.abstract void
fillContent
(T resourceInfo) Fills the content of the tabs panel.org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode
Returns the gallery mode.protected abstract I_CmsPreviewHandler<T>
Returns the preview handler.abstract boolean
Returns if there are any changes that need saving, before the preview may be closed.void
onCloseClick
(com.google.gwt.event.dom.client.ClickEvent event) Will be triggered, when the select button is clicked.void
onSelectClick
(com.google.gwt.event.dom.client.ClickEvent event) Will be triggered, when the select button is clicked.void
Removes the preview.abstract void
saveChanges
(com.google.gwt.user.client.Command afterSaveCommand) Saves the changes for this dialog.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 Details
-
m_buttonBar
The button panel. -
m_closePreview
The select button. -
m_dialogHeight
The dialog height. -
m_dialogWidth
The dialog width. -
m_galleryMode
The dialog mode of the gallery. -
m_parentPanel
The parent panel of the preview dialog. -
m_previewHeight
The preview height. -
m_previewHolder
The preview placeholder panel. -
m_previewPanel
The preview panel of preview dialog. -
m_selectButton
The select button. -
m_title
The title label. -
m_tabbedPanel
The tabbed panel of the preview dialog. -
m_tabsHolder
The tabs placeholder panel.
-
-
Constructor Details
-
Method Details
-
confirmSaveChanges
public void confirmSaveChanges(String message, com.google.gwt.user.client.Command onConfirm, com.google.gwt.user.client.Command onCancel) Displays a confirm save changes dialog with the given message. May insert individual message before the given one for further information.Will call the appropriate command after saving/cancel.
- Parameters:
message
- the message to displayonConfirm
- the command executed after savingonCancel
- the command executed on cancel
-
fillContent
Fills the content of the tabs panel.- Parameters:
resourceInfo
- the bean containing the parameter
-
getGalleryMode
Returns the gallery mode.- Returns:
- the gallery mode
-
hasChanges
Returns if there are any changes that need saving, before the preview may be closed.- Returns:
true
if changed
-
onCloseClick
@UiHandler("m_closePreview") public void onCloseClick(com.google.gwt.event.dom.client.ClickEvent event) Will be triggered, when the select button is clicked.- Parameters:
event
- the click event
-
onSelectClick
@UiHandler("m_selectButton") public void onSelectClick(com.google.gwt.event.dom.client.ClickEvent event) Will be triggered, when the select button is clicked.- Parameters:
event
- the click event
-
removePreview
Removes the preview. -
saveChanges
Saves the changes for this dialog.- Parameters:
afterSaveCommand
- the command to execute after saving the changes
-
getHandler
Returns the preview handler.- Returns:
- the preview handler
-