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
Nested Classes Modifier and Type Class Description protected static interface
A_CmsPreviewDialog.I_CmsPreviewDialogUiBinder
-
Field Summary
Fields Modifier and Type Field Description protected com.google.gwt.user.client.ui.FlowPanel
m_buttonBar
The button panel.protected CmsPushButton
m_closePreview
The select button.protected int
m_dialogHeight
The dialog height.protected int
m_dialogWidth
The dialog width.protected org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode
m_galleryMode
The dialog mode of the gallery.protected com.google.gwt.user.client.ui.FlowPanel
m_parentPanel
The parent panel of the preview dialog.protected int
m_previewHeight
The preview height.protected com.google.gwt.user.client.ui.FlowPanel
m_previewHolder
The preview placeholder panel.protected com.google.gwt.user.client.ui.SimplePanel
m_previewPanel
The preview panel of preview dialog.protected CmsPushButton
m_selectButton
The select button.protected CmsTabbedPanel<com.google.gwt.user.client.ui.Widget>
m_tabbedPanel
The tabbed panel of the preview dialog.protected com.google.gwt.user.client.ui.FlowPanel
m_tabsHolder
The tabs placeholder panel.protected com.google.gwt.user.client.ui.Label
m_title
The title label.
-
Constructor Summary
Constructors Constructor Description A_CmsPreviewDialog(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode dialogMode, int dialogHeight, int dialogWidth, boolean disableSelection)
The constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
confirmSaveChanges(java.lang.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
getGalleryMode()
Returns the gallery mode.protected abstract I_CmsPreviewHandler<T>
getHandler()
Returns the preview handler.abstract boolean
hasChanges()
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
removePreview()
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 Detail
-
m_buttonBar
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_buttonBar
The button panel.
-
m_closePreview
@UiField protected CmsPushButton m_closePreview
The select button.
-
m_dialogHeight
protected int m_dialogHeight
The dialog height.
-
m_dialogWidth
protected int m_dialogWidth
The dialog width.
-
m_galleryMode
protected org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode m_galleryMode
The dialog mode of the gallery.
-
m_parentPanel
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_parentPanel
The parent panel of the preview dialog.
-
m_previewHeight
protected int m_previewHeight
The preview height.
-
m_previewHolder
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_previewHolder
The preview placeholder panel.
-
m_previewPanel
@UiField protected com.google.gwt.user.client.ui.SimplePanel m_previewPanel
The preview panel of preview dialog.
-
m_selectButton
@UiField protected CmsPushButton m_selectButton
The select button.
-
m_title
@UiField protected com.google.gwt.user.client.ui.Label m_title
The title label.
-
m_tabbedPanel
protected CmsTabbedPanel<com.google.gwt.user.client.ui.Widget> m_tabbedPanel
The tabbed panel of the preview dialog.
-
m_tabsHolder
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_tabsHolder
The tabs placeholder panel.
-
-
Constructor Detail
-
A_CmsPreviewDialog
public A_CmsPreviewDialog(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode dialogMode, int dialogHeight, int dialogWidth, boolean disableSelection)
The constructor.- Parameters:
dialogMode
- the gallery dialog mode (view, widget, ade, editor, ...)dialogHeight
- the dialog height to setdialogWidth
- the dialog width to setdisableSelection
- true if selection should be disabled in the preview
-
-
Method Detail
-
confirmSaveChanges
public void confirmSaveChanges(java.lang.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
public abstract void fillContent(T resourceInfo)
Fills the content of the tabs panel.- Parameters:
resourceInfo
- the bean containing the parameter
-
getGalleryMode
public org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode getGalleryMode()
Returns the gallery mode.- Returns:
- the gallery mode
-
hasChanges
public abstract boolean 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
public void removePreview()
Removes the preview.
-
saveChanges
public abstract void saveChanges(com.google.gwt.user.client.Command afterSaveCommand)
Saves the changes for this dialog.- Parameters:
afterSaveCommand
- the command to execute after saving the changes
-
getHandler
protected abstract I_CmsPreviewHandler<T> getHandler()
Returns the preview handler.- Returns:
- the preview handler
-
-