Class CmsImagePreviewDialog

  • All Implemented Interfaces:,,,,,

    public class CmsImagePreviewDialog
    extends A_CmsPreviewDialog<org.opencms.ade.galleries.shared.CmsImageInfoBean>
    Provides a widget for the image preview dialog .

    • Nested Class Summary

      • Nested classes/interfaces inherited from class,
    • Constructor Summary

      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​( afterSaveCommand)
      Saves the changes for this dialog.
      • Methods inherited from class

        claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
      • Methods inherited from class

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class

        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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CmsImagePreviewDialog

        public CmsImagePreviewDialog​(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode dialogMode,
                                     int dialogHeight,
                                     int dialogWidth,
                                     boolean disableSelection)
        The constructor.

        dialogMode - the dialog mode
        dialogHeight - the dialog height to set
        dialogWidth - the dialog width to set
        disableSelection - 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 class A_CmsPreviewDialog<org.opencms.ade.galleries.shared.CmsImageInfoBean>
        infoBean - the bean containing the parameter
      • fillPreviewPanel

        public void fillPreviewPanel​(org.opencms.ade.galleries.shared.CmsImageInfoBean infoBean)
        Fills the preview panel.

        infoBean - the image info
      • getDialogWidth

        public int getDialogWidth()
        Returns the dialog width.

        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.

        attributes - the attribute map
        callback - the callback to execute
      • getPreviewHeight

        public int getPreviewHeight()
        Returns the preview height.

        the preview height
      • resetPreviewImage

        public void resetPreviewImage​(java.lang.String path)
        Resets the image displayed in the preview.

        path - the image path including scale parameter
      • onLoad

        protected void onLoad()
        onLoad in class
        See Also: