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
FieldsModifier and TypeFieldDescriptionprotected CmsPushButtonThe cancel button.protected CmsAreaSelectPanelThe cropping panel.protected com.google.gwt.user.client.ui.LabelThe height label.protected com.google.gwt.user.client.ui.LabelThe height label.protected com.google.gwt.user.client.ui.ImageThe image.protected CmsPushButtonThe OK button.protected com.google.gwt.user.client.ui.LabelThe height label.protected com.google.gwt.user.client.ui.LabelThe height label.protected com.google.gwt.dom.client.ElementThe top panel holding the cropping area.protected com.google.gwt.user.client.ui.LabelThe height label.protected com.google.gwt.user.client.ui.LabelThe height label.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.event.shared.HandlerRegistrationaddValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<CmsCroppingParamBean> handler) protected voidonCancel(com.google.gwt.event.dom.client.ClickEvent event) Handles the click event for cancel button.protected voidonOk(com.google.gwt.event.dom.client.ClickEvent event) Handles the click event for ok button.voidonValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent<CmsPositionBean> event) voidshow(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, setWidgetMethods 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, unsinkEventsMethods 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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