Class CmsImageGalleryField
- 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.ui.CmsGalleryField
-
- org.opencms.ade.galleries.client.ui.CmsImageGalleryField
-
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasFocusHandlers
,com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.logical.shared.HasResizeHandlers
,com.google.gwt.event.logical.shared.HasValueChangeHandlers<java.lang.String>
,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
,I_CmsHasInit
,I_CmsFormWidget
public class CmsImageGalleryField extends CmsGalleryField
A widget for selecting a resource from an ADE gallery dialog.- Since:
- 8.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.ade.galleries.client.ui.CmsGalleryField
CmsGalleryField.I_CmsGalleryFieldUiBinder, CmsGalleryField.OpenCloseHandler
-
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
-
Nested classes/interfaces inherited from interface org.opencms.gwt.client.ui.input.I_CmsFormWidget
I_CmsFormWidget.FieldType
-
-
Field Summary
Fields Modifier and Type Field Description protected CmsTextArea
m_descriptionArea
The text area.protected CmsSelectBox
m_formatSelection
The select box.-
Fields inherited from class org.opencms.ade.galleries.client.ui.CmsGalleryField
m_configuration, m_croppingParam, m_fader, m_fieldBox, m_imagePreview, m_main, m_opener, m_popup, m_resourceInfoPanel, m_specialUploadButton, m_textbox, m_uploadButton, m_uploadDropZone, WIDGET_TYPE
-
-
Constructor Summary
Constructors Constructor Description CmsImageGalleryField(org.opencms.ade.galleries.shared.I_CmsGalleryConfiguration configuration, boolean allowUploads)
Constructs a new gallery widget.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFormValueAsString()
Gets the current value of the widget as a string.static void
initClass()
Initializes this class.protected void
onFocusDescription(com.google.gwt.event.dom.client.FocusEvent event)
Handles the focus event on the opener.protected void
onFocusSelect(com.google.gwt.event.dom.client.FocusEvent event)
Handles the focus event on the opener.void
onSelectBoxChange(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.String> event)
On select box value change.void
onTextAreaBoxChange(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.String> event)
On textarea box value change.void
onTextAreaBoxResize(com.google.gwt.event.logical.shared.ResizeEvent event)
On textarea box resize.void
setName(java.lang.String name)
Sets the name of the input field.void
setValue(java.lang.String value, boolean fireEvent)
Sets the widget value.protected void
setValueFromGallery(java.lang.String resourcePath, org.opencms.util.CmsUUID structureId, CmsCroppingParamBean croppingParameter)
Sets the widget value.-
Methods inherited from class org.opencms.ade.galleries.client.ui.CmsGalleryField
addFieldStyleName, addFocusHandler, addResizeHandler, addToMain, addValueChangeHandler, fireChange, fireResize, getApparentValue, getCurrentElement, getFieldType, getFormValue, getGalleryService, getPopup, isDndEnabled, isEnabled, onFocusTextbox, openGalleryDialog, removeFromMain, reset, setAutoHideParent, setDropZoneElement, setEnabled, setErrorMessage, setFormValueAsString, setGalleryOpenerTitle, setHasImage, setImagePreview, updateUploadTarget
-
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
-
-
-
-
Field Detail
-
m_descriptionArea
protected CmsTextArea m_descriptionArea
The text area.
-
m_formatSelection
protected CmsSelectBox m_formatSelection
The select box.
-
-
Constructor Detail
-
CmsImageGalleryField
public CmsImageGalleryField(org.opencms.ade.galleries.shared.I_CmsGalleryConfiguration configuration, boolean allowUploads)
Constructs a new gallery widget.- Parameters:
configuration
- the gallery configurationallowUploads
- states if the upload button should be enabled for this widget
-
-
Method Detail
-
initClass
public static void initClass()
Initializes this class.
-
getFormValueAsString
public java.lang.String getFormValueAsString()
Description copied from interface:I_CmsFormWidget
Gets the current value of the widget as a string.- Specified by:
getFormValueAsString
in interfaceI_CmsFormWidget
- Overrides:
getFormValueAsString
in classCmsGalleryField
- Returns:
- the current value of the widget
- See Also:
I_CmsFormWidget.getFormValueAsString()
-
onSelectBoxChange
@UiHandler("m_formatSelection") public void onSelectBoxChange(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.String> event)
On select box value change.- Parameters:
event
- the event
-
onTextAreaBoxChange
@UiHandler("m_descriptionArea") public void onTextAreaBoxChange(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.String> event)
On textarea box value change.- Parameters:
event
- the event
-
onTextAreaBoxResize
@UiHandler("m_descriptionArea") public void onTextAreaBoxResize(com.google.gwt.event.logical.shared.ResizeEvent event)
On textarea box resize.- Parameters:
event
- the event
-
setName
public void setName(java.lang.String name)
Sets the name of the input field.- Overrides:
setName
in classCmsGalleryField
- Parameters:
name
- of the input field
-
setValue
public void setValue(java.lang.String value, boolean fireEvent)
Sets the widget value.- Overrides:
setValue
in classCmsGalleryField
- Parameters:
value
- the value to setfireEvent
- if the change event should be fired
-
onFocusDescription
@UiHandler("m_descriptionArea") protected void onFocusDescription(com.google.gwt.event.dom.client.FocusEvent event)
Handles the focus event on the opener.- Parameters:
event
- the focus event
-
onFocusSelect
@UiHandler("m_formatSelection") protected void onFocusSelect(com.google.gwt.event.dom.client.FocusEvent event)
Handles the focus event on the opener.- Parameters:
event
- the focus event
-
setValueFromGallery
protected void setValueFromGallery(java.lang.String resourcePath, org.opencms.util.CmsUUID structureId, CmsCroppingParamBean croppingParameter)
Description copied from class:CmsGalleryField
Sets the widget value. To be called from the gallery dialog.- Overrides:
setValueFromGallery
in classCmsGalleryField
- Parameters:
resourcePath
- the selected resource pathstructureId
- the resource structure idcroppingParameter
- the selected cropping- See Also:
CmsGalleryField.setValueFromGallery(java.lang.String, org.opencms.util.CmsUUID, org.opencms.ade.galleries.client.preview.CmsCroppingParamBean)
-
-