Class CmsImagePreviewDialog
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<org.opencms.ade.galleries.shared.CmsImageInfoBean>
org.opencms.ade.galleries.client.preview.ui.CmsImagePreviewDialog
- 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 CmsImagePreviewDialog
extends A_CmsPreviewDialog<org.opencms.ade.galleries.shared.CmsImageInfoBean>
Provides a widget for the image preview dialog .
- Since:
 - 8.0.
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class org.opencms.ade.galleries.client.preview.ui.A_CmsPreviewDialog
A_CmsPreviewDialog.I_CmsPreviewDialogUiBinderNested 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
FieldsModifier and TypeFieldDescriptionstatic final intThe default min height of the image.static final intThe default min width of the image.static final StringStyle name for distinguishing whether the properties tab is currently active or not.Fields inherited from class org.opencms.ade.galleries.client.preview.ui.A_CmsPreviewDialog
m_buttonBar, m_closePreview, m_dialogHeight, m_dialogWidth, m_galleryMode, m_parentPanel, m_previewHeight, m_previewHolder, m_previewPanel, m_selectButton, m_tabbedPanel, m_tabsHolder, m_titleFields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX - 
Constructor Summary
ConstructorsConstructorDescriptionCmsImagePreviewDialog(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode dialogMode, int dialogHeight, int dialogWidth, boolean disableSelection) The constructor. - 
Method Summary
Modifier and TypeMethodDescriptionvoidfillContent(org.opencms.ade.galleries.shared.CmsImageInfoBean infoBean) Fills the content of the tabs panel.voidfillPreviewPanel(org.opencms.ade.galleries.shared.CmsImageInfoBean infoBean) Fills the preview panel.intReturns the dialog width.protected CmsImagePreviewHandlerReturns the preview handler.voidgetImageAttributes(Map<String, String> attributes, I_CmsSimpleCallback<Map<String, String>> callback) Adds necessary attributes to the map.intReturns the preview height.com.google.gwt.user.client.ui.ImageGets the current preview image.booleanReturns if there are any changes that need saving, before the preview may be closed.voidinit(CmsImagePreviewHandler handler) Initializes the preview.protected voidonLoad()voidresetPreviewImage(String path, String highResPath) Resets the image displayed in the preview.voidsaveChanges(com.google.gwt.user.client.Command afterSaveCommand) Saves the changes for this dialog.Methods inherited from class org.opencms.ade.galleries.client.preview.ui.A_CmsPreviewDialog
confirmSaveChanges, getGalleryMode, onCloseClick, onSelectClick, removePreviewMethods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods 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, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods 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
- 
IMAGE_HEIGHT_MAX
The default min height of the image.- See Also:
 
 - 
IMAGE_WIDTH_MAX
The default min width of the image.- See Also:
 
 - 
STYLE_PROPERTIES_TAB_ACTIVE
Style name for distinguishing whether the properties tab is currently active or not.- See Also:
 
 
 - 
 - 
Constructor Details
 - 
Method Details
- 
getDialogWidth
Returns the dialog width.- Returns:
 - the dialog width
 
 - 
getImageAttributes
public void getImageAttributes(Map<String, String> attributes, I_CmsSimpleCallback<Map<String, String>> callback) Adds necessary attributes to the map.- Parameters:
 attributes- the attribute mapcallback- the callback to execute
 - 
getPreviewHeight
Returns the preview height.- Returns:
 - the preview height
 
 - 
getPreviewImage
Gets the current preview image.- Returns:
 - the preview image
 
 - 
hasChanges
Description copied from class:A_CmsPreviewDialogReturns if there are any changes that need saving, before the preview may be closed.- Specified by:
 hasChangesin classA_CmsPreviewDialog<org.opencms.ade.galleries.shared.CmsImageInfoBean>- Returns:
 trueif changed- See Also:
 
 - 
init
Initializes the preview.- Parameters:
 handler- the preview handler
 - 
resetPreviewImage
Resets the image displayed in the preview.- Parameters:
 path- the image path including scale parameter
 - 
saveChanges
Description copied from class:A_CmsPreviewDialogSaves the changes for this dialog.- Specified by:
 saveChangesin classA_CmsPreviewDialog<org.opencms.ade.galleries.shared.CmsImageInfoBean>- Parameters:
 afterSaveCommand- the command to execute after saving the changes- See Also:
 
 - 
getHandler
Description copied from class:A_CmsPreviewDialogReturns the preview handler.- Specified by:
 getHandlerin classA_CmsPreviewDialog<org.opencms.ade.galleries.shared.CmsImageInfoBean>- Returns:
 - the preview handler
 - See Also:
 
 - 
onLoad
- Overrides:
 onLoadin classcom.google.gwt.user.client.ui.Widget- See Also: