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
Modifier and TypeFieldDescriptionprotected CmsPushButton
The cancel button.protected CmsAreaSelectPanel
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
-
Method Summary
Modifier and TypeMethodDescriptioncom.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
show
(CmsCroppingParamBean targetParam) 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
The cancel button. -
m_croppingPanel
The cropping panel. -
m_heightDisplay
The height label. -
m_heightLabel
The height label. -
m_image
The image. -
m_okButton
The OK button. -
m_scaleDisplay
The height label. -
m_scaleLabel
The height label. -
m_topPanel
The top panel holding the cropping area. -
m_widthDisplay
The height label. -
m_widthLabel
The height label.
-
-
Constructor Details
-
CmsCroppingDialog
Constructor.- Parameters:
imagePath
- the image path
-
-
Method Details
-
show
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
Handles the click event for ok button. Sets the selected cropping parameters.- Parameters:
event
- the click event