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_CmsPreviewDialogUiBinder
-
-
Field Summary
Fields Modifier and Type Field Description static int
IMAGE_HEIGHT_MAX
The default min height of the image.static int
IMAGE_WIDTH_MAX
The default min width of the image.static java.lang.String
STYLE_PROPERTIES_TAB_ACTIVE
Style 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_title
-
-
Constructor Summary
Constructors Constructor Description CmsImagePreviewDialog(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode dialogMode, int dialogHeight, int dialogWidth, boolean disableSelection)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fillContent(org.opencms.ade.galleries.shared.CmsImageInfoBean infoBean)
Fills the content of the tabs panel.void
fillPreviewPanel(org.opencms.ade.galleries.shared.CmsImageInfoBean infoBean)
Fills the preview panel.int
getDialogWidth()
Returns the dialog width.protected CmsImagePreviewHandler
getHandler()
Returns the preview handler.void
getImageAttributes(java.util.Map<java.lang.String,java.lang.String> attributes, I_CmsSimpleCallback<java.util.Map<java.lang.String,java.lang.String>> callback)
Adds necessary attributes to the map.int
getPreviewHeight()
Returns the preview height.boolean
hasChanges()
Returns if there are any changes that need saving, before the preview may be closed.void
init(CmsImagePreviewHandler handler)
Initializes the preview.protected void
onLoad()
void
resetPreviewImage(java.lang.String path)
Resets the image displayed in the preview.void
saveChanges(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, removePreview
-
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, 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
-
IMAGE_HEIGHT_MAX
public static final int IMAGE_HEIGHT_MAX
The default min height of the image.- See Also:
- Constant Field Values
-
IMAGE_WIDTH_MAX
public static final int IMAGE_WIDTH_MAX
The default min width of the image.- See Also:
- Constant Field Values
-
STYLE_PROPERTIES_TAB_ACTIVE
public static final java.lang.String STYLE_PROPERTIES_TAB_ACTIVE
Style name for distinguishing whether the properties tab is currently active or not.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsImagePreviewDialog
public CmsImagePreviewDialog(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode dialogMode, int dialogHeight, int dialogWidth, boolean disableSelection)
The constructor.- Parameters:
dialogMode
- the dialog modedialogHeight
- the dialog height to setdialogWidth
- the dialog width to setdisableSelection
- true if selection from the preview should be disabled
-
-
Method Detail
-
fillContent
public void fillContent(org.opencms.ade.galleries.shared.CmsImageInfoBean infoBean)
Fills the content of the tabs panel.- Specified by:
fillContent
in classA_CmsPreviewDialog<org.opencms.ade.galleries.shared.CmsImageInfoBean>
- Parameters:
infoBean
- the bean containing the parameter
-
fillPreviewPanel
public void fillPreviewPanel(org.opencms.ade.galleries.shared.CmsImageInfoBean infoBean)
Fills the preview panel.- Parameters:
infoBean
- the image info
-
getDialogWidth
public int getDialogWidth()
Returns the dialog width.- Returns:
- the dialog width
-
getImageAttributes
public void getImageAttributes(java.util.Map<java.lang.String,java.lang.String> attributes, I_CmsSimpleCallback<java.util.Map<java.lang.String,java.lang.String>> callback)
Adds necessary attributes to the map.- Parameters:
attributes
- the attribute mapcallback
- the callback to execute
-
getPreviewHeight
public int getPreviewHeight()
Returns the preview height.- Returns:
- the preview height
-
hasChanges
public boolean hasChanges()
Description copied from class:A_CmsPreviewDialog
Returns if there are any changes that need saving, before the preview may be closed.- Specified by:
hasChanges
in classA_CmsPreviewDialog<org.opencms.ade.galleries.shared.CmsImageInfoBean>
- Returns:
true
if changed- See Also:
A_CmsPreviewDialog.hasChanges()
-
init
public void init(CmsImagePreviewHandler handler)
Initializes the preview.- Parameters:
handler
- the preview handler
-
resetPreviewImage
public void resetPreviewImage(java.lang.String path)
Resets the image displayed in the preview.- Parameters:
path
- the image path including scale parameter
-
saveChanges
public void saveChanges(com.google.gwt.user.client.Command afterSaveCommand)
Description copied from class:A_CmsPreviewDialog
Saves the changes for this dialog.- Specified by:
saveChanges
in classA_CmsPreviewDialog<org.opencms.ade.galleries.shared.CmsImageInfoBean>
- Parameters:
afterSaveCommand
- the command to execute after saving the changes- See Also:
A_CmsPreviewDialog.saveChanges(com.google.gwt.user.client.Command)
-
getHandler
protected CmsImagePreviewHandler getHandler()
Description copied from class:A_CmsPreviewDialog
Returns the preview handler.- Specified by:
getHandler
in classA_CmsPreviewDialog<org.opencms.ade.galleries.shared.CmsImageInfoBean>
- Returns:
- the preview handler
- See Also:
A_CmsPreviewDialog.getHandler()
-
onLoad
protected void onLoad()
- Overrides:
onLoad
in classcom.google.gwt.user.client.ui.Widget
- See Also:
Widget.onLoad()
-
-