Class 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 com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
    • 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 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
      • 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.

        Parameters:
        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>
        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 map
        callback - the callback to execute
      • getPreviewHeight

        public int getPreviewHeight()
        Returns the preview height.

        Returns:
        the preview height
      • resetPreviewImage

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

        Parameters:
        path - the image path including scale parameter
      • onLoad

        protected void onLoad()
        Overrides:
        onLoad in class com.google.gwt.user.client.ui.Widget
        See Also:
        Widget.onLoad()