Class CmsFocalPointController

java.lang.Object
org.opencms.ade.galleries.client.preview.CmsFocalPointController

public class CmsFocalPointController extends Object
Handles manipulation of the focal point in the gallery dialog.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    Global static flag to enable / disable focal point modification.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CmsFocalPointController(Supplier<CmsCroppingParamBean> croppingProvider, Supplier<org.opencms.ade.galleries.shared.CmsImageInfoBean> infoProvider, Runnable nextAction)
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the user clicks on the focal point widget.
    void
    Saves the focal point to a property on the image.
    void
    updateImage(com.google.gwt.user.client.ui.FlowPanel container, com.google.gwt.user.client.ui.Image previewImage)
    Updates the image.

    Methods inherited from class java.lang.Object

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

    • ENABLED

      public static final boolean ENABLED
      Global static flag to enable / disable focal point modification.
      See Also:
  • Constructor Details

    • CmsFocalPointController

      public CmsFocalPointController(Supplier<CmsCroppingParamBean> croppingProvider, Supplier<org.opencms.ade.galleries.shared.CmsImageInfoBean> infoProvider, Runnable nextAction)
      Creates a new instance.

      Parameters:
      croppingProvider - the source of the cropping information
      infoProvider - the source of the image info
      nextAction - the action to execute when the focal point is changed
  • Method Details

    • onStartDrag

      public void onStartDrag()
      Called when the user clicks on the focal point widget.

      This starts drag and drop.

    • reset

      public void reset()
      Saves the focal point to a property on the image.

    • updateImage

      public void updateImage(com.google.gwt.user.client.ui.FlowPanel container, com.google.gwt.user.client.ui.Image previewImage)
      Updates the image.

      Parameters:
      container - the parent widget for the image
      previewImage - the image