Class CmsCroppingDialog

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.CmsCroppingDialog
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasValueChangeHandlers<CmsCroppingParamBean>, com.google.gwt.event.logical.shared.ValueChangeHandler<CmsPositionBean>, com.google.gwt.event.shared.EventHandler, 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 CmsCroppingDialog extends com.google.gwt.user.client.ui.Composite implements com.google.gwt.event.logical.shared.ValueChangeHandler<CmsPositionBean>, com.google.gwt.event.logical.shared.HasValueChangeHandlers<CmsCroppingParamBean>
Image cropping dialog.

Since:
8.0.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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected CmsPushButton
    The cancel button.
    The cropping panel.
    protected com.google.gwt.user.client.ui.Label
    The height label.
    protected com.google.gwt.user.client.ui.Label
    The height label.
    protected com.google.gwt.user.client.ui.Image
    The image.
    protected CmsPushButton
    The OK button.
    protected com.google.gwt.user.client.ui.Label
    The height label.
    protected com.google.gwt.user.client.ui.Label
    The height label.
    protected com.google.gwt.dom.client.Element
    The top panel holding the cropping area.
    protected com.google.gwt.user.client.ui.Label
    The height label.
    protected com.google.gwt.user.client.ui.Label
    The height label.

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

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.gwt.event.shared.HandlerRegistration
    addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<CmsCroppingParamBean> handler)
     
    protected void
    onCancel(com.google.gwt.event.dom.client.ClickEvent event)
    Handles the click event for cancel button.
    protected void
    onOk(com.google.gwt.event.dom.client.ClickEvent event)
    Handles the click event for ok button.
    void
    onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent<CmsPositionBean> event)
     
    void
    Shows the 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

    Methods inherited from interface com.google.gwt.event.shared.HasHandlers

    fireEvent
  • Field Details

    • m_cancelButton

      @UiField protected CmsPushButton m_cancelButton
      The cancel button.
    • m_croppingPanel

      @UiField protected CmsAreaSelectPanel m_croppingPanel
      The cropping panel.
    • m_heightDisplay

      @UiField protected com.google.gwt.user.client.ui.Label m_heightDisplay
      The height label.
    • m_heightLabel

      @UiField protected com.google.gwt.user.client.ui.Label m_heightLabel
      The height label.
    • m_image

      @UiField protected com.google.gwt.user.client.ui.Image m_image
      The image.
    • m_okButton

      @UiField protected CmsPushButton m_okButton
      The OK button.
    • m_scaleDisplay

      @UiField protected com.google.gwt.user.client.ui.Label m_scaleDisplay
      The height label.
    • m_scaleLabel

      @UiField protected com.google.gwt.user.client.ui.Label m_scaleLabel
      The height label.
    • m_topPanel

      @UiField protected com.google.gwt.dom.client.Element m_topPanel
      The top panel holding the cropping area.
    • m_widthDisplay

      @UiField protected com.google.gwt.user.client.ui.Label m_widthDisplay
      The height label.
    • m_widthLabel

      @UiField protected com.google.gwt.user.client.ui.Label m_widthLabel
      The height label.
  • Constructor Details

    • CmsCroppingDialog

      public CmsCroppingDialog(String imagePath)
      Constructor.

      Parameters:
      imagePath - the image path
  • Method Details

    • addValueChangeHandler

      public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<CmsCroppingParamBean> handler)
      Specified by:
      addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<CmsCroppingParamBean>
      See Also:
      • HasValueChangeHandlers.addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler)
    • onValueChange

      public void onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent<CmsPositionBean> event)
      Specified by:
      onValueChange in interface com.google.gwt.event.logical.shared.ValueChangeHandler<CmsPositionBean>
      See Also:
      • ValueChangeHandler.onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)
    • show

      public void show(CmsCroppingParamBean targetParam)
      Shows the dialog.

      Parameters:
      targetParam - the target cropping parameter, containing the target size restriction
    • onCancel

      @UiHandler("m_cancelButton") protected void onCancel(com.google.gwt.event.dom.client.ClickEvent event)
      Handles the click event for cancel button. Hides the cropping dialog.

      Parameters:
      event - the click event
    • onOk

      @UiHandler("m_okButton") protected void onOk(com.google.gwt.event.dom.client.ClickEvent event)
      Handles the click event for ok button. Sets the selected cropping parameters.

      Parameters:
      event - the click event