Class CmsFocalPointController
- java.lang.Object
-
- org.opencms.ade.galleries.client.preview.CmsFocalPointController
-
public class CmsFocalPointController extends java.lang.Object
Handles manipulation of the focal point in the gallery dialog.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
ENABLED
Global static flag to enable / disable focal point modification.
-
Constructor Summary
Constructors Constructor Description CmsFocalPointController(java.util.function.Supplier<CmsCroppingParamBean> croppingProvider, java.util.function.Supplier<org.opencms.ade.galleries.shared.CmsImageInfoBean> infoProvider, java.lang.Runnable nextAction)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onStartDrag()
Called when the user clicks on the focal point widget.void
reset()
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.
-
-
-
Field Detail
-
ENABLED
public static final boolean ENABLED
Global static flag to enable / disable focal point modification.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsFocalPointController
public CmsFocalPointController(java.util.function.Supplier<CmsCroppingParamBean> croppingProvider, java.util.function.Supplier<org.opencms.ade.galleries.shared.CmsImageInfoBean> infoProvider, java.lang.Runnable nextAction)
Creates a new instance.- Parameters:
croppingProvider
- the source of the cropping informationinfoProvider
- the source of the image infonextAction
- the action to execute when the focal point is changed
-
-
Method Detail
-
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 imagepreviewImage
- the image
-
-