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 
     

    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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.google.gwt.user.client.ui.FlowPanel
    The button panel.
    protected CmsPushButton
    The select button.
    protected int
    The dialog height.
    protected int
    The dialog width.
    protected org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode
    The dialog mode of the gallery.
    protected com.google.gwt.user.client.ui.FlowPanel
    The parent panel of the preview dialog.
    protected int
    The preview height.
    protected com.google.gwt.user.client.ui.FlowPanel
    The preview placeholder panel.
    protected com.google.gwt.user.client.ui.SimplePanel
    The preview panel of preview dialog.
    protected CmsPushButton
    The select button.
    protected CmsTabbedPanel<com.google.gwt.user.client.ui.Widget>
    The tabbed panel of the preview dialog.
    protected com.google.gwt.user.client.ui.FlowPanel
    The tabs placeholder panel.
    protected com.google.gwt.user.client.ui.Label
    The title label.

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX
  • 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

    Modifier and Type
    Method
    Description
    void
    confirmSaveChanges(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
    Returns the gallery mode.
    protected abstract I_CmsPreviewHandler<T>
    Returns the preview handler.
    abstract boolean
    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
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • 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 Details

    • 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 set
      dialogWidth - the dialog width to set
      disableSelection - true if selection should be disabled in the preview
  • Method Details

    • confirmSaveChanges

      public void confirmSaveChanges(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 display
      onConfirm - the command executed after saving
      onCancel - 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