Class CmsFormWidgetWrapper
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.acacia.client.widgets.CmsFormWidgetWrapper
- 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<String>
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.TakesValue<String>
,com.google.gwt.user.client.ui.HasValue<String>
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.IsRenderable
,com.google.gwt.user.client.ui.IsWidget
,I_CmsEditWidget
,I_CmsFormEditWidget
,I_CmsHasDisplayDirection
,I_CmsHasResizeOnShow
public class CmsFormWidgetWrapper
extends com.google.gwt.user.client.ui.Composite
implements I_CmsFormEditWidget, com.google.gwt.event.logical.shared.HasResizeHandlers, I_CmsHasResizeOnShow, I_CmsHasDisplayDirection
Wraps an edit widget to supply a widget label.
-
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
Nested classes/interfaces inherited from interface org.opencms.acacia.client.widgets.I_CmsHasDisplayDirection
I_CmsHasDisplayDirection.Direction
-
Field Summary
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
addFocusHandler
(com.google.gwt.event.dom.client.FocusHandler handler) com.google.gwt.event.shared.HandlerRegistration
addResizeHandler
(com.google.gwt.event.logical.shared.ResizeHandler handler) com.google.gwt.event.shared.HandlerRegistration
addValueChangeHandler
(com.google.gwt.event.logical.shared.ValueChangeHandler<String> handler) Returns the display direction.Gets the wrapped widget.com.google.gwt.user.client.ui.Label
getLabel()
Returns the label widget.getValue()
boolean
isActive()
Returns if the widget is active.void
This method is called when a widget is attached to the browser's document.boolean
owns
(com.google.gwt.dom.client.Element element) Returns true if the element should be logically counted as part of the widget for the purpose of determining whether a mouse click is "outside".void
Adjusts widget's size once it's visible.void
setActive
(boolean active) Sets the widget active/inactive.void
setEditWidget
(I_CmsEditWidget editWidget) The edit widget needs to set, before the widget may be used.void
Sets the name of input fields.void
void
void
setWidgetInfo
(String label, String help) Sets the widget label and help text.boolean
If this returns true, the default value will also be set as the widget value if the widget is inactive (i.e.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
Methods inherited from interface com.google.gwt.user.client.ui.IsWidget
asWidget
-
Constructor Details
-
CmsFormWidgetWrapper
public CmsFormWidgetWrapper()Constructor. -
CmsFormWidgetWrapper
Constructor.- Parameters:
editWidget
- the edit widget to wrap
-
-
Method Details
-
addFocusHandler
public com.google.gwt.event.shared.HandlerRegistration addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler) - Specified by:
addFocusHandler
in interfacecom.google.gwt.event.dom.client.HasFocusHandlers
- See Also:
-
HasFocusHandlers.addFocusHandler(com.google.gwt.event.dom.client.FocusHandler)
-
getDisplayingDirection
Description copied from interface:I_CmsHasDisplayDirection
Returns the display direction.- Specified by:
getDisplayingDirection
in interfaceI_CmsHasDisplayDirection
- Returns:
- the display direction
- See Also:
-
getEditWidget
Gets the wrapped widget.- Returns:
- the wrapped widget
-
getLabel
Returns the label widget.- Returns:
- the label widget
-
getValue
-
isActive
Description copied from interface:I_CmsEditWidget
Returns if the widget is active.- Specified by:
isActive
in interfaceI_CmsEditWidget
- Returns:
true
if the widget is active- See Also:
-
onAttachWidget
Description copied from interface:I_CmsEditWidget
This method is called when a widget is attached to the browser's document.It needs to call the
Widget.onAttach()
method.- Specified by:
onAttachWidget
in interfaceI_CmsEditWidget
- See Also:
-
owns
Description copied from interface:I_CmsEditWidget
Returns true if the element should be logically counted as part of the widget for the purpose of determining whether a mouse click is "outside". For example, this is needed if the widget uses a popup.- Specified by:
owns
in interfaceI_CmsEditWidget
- Parameters:
element
- the element to check- Returns:
- true if the element counts as part of the widget
- See Also:
-
resizeOnShow
Description copied from interface:I_CmsHasResizeOnShow
Adjusts widget's size once it's visible.- Specified by:
resizeOnShow
in interfaceI_CmsHasResizeOnShow
- See Also:
-
setActive
Description copied from interface:I_CmsEditWidget
Sets the widget active/inactive.- Specified by:
setActive
in interfaceI_CmsEditWidget
- Parameters:
active
-true
to activate the widget- See Also:
-
setEditWidget
The edit widget needs to set, before the widget may be used.- Parameters:
editWidget
- the edit widget to wrap
-
setName
Description copied from interface:I_CmsEditWidget
Sets the name of input fields.- Specified by:
setName
in interfaceI_CmsEditWidget
- Parameters:
name
- of the input field- See Also:
-
setValue
-
setValue
- Specified by:
setValue
in interfacecom.google.gwt.user.client.ui.HasValue<String>
- Specified by:
setValue
in interfaceI_CmsEditWidget
- See Also:
-
setWidgetInfo
Description copied from interface:I_CmsFormEditWidget
Sets the widget label and help text.- Specified by:
setWidgetInfo
in interfaceI_CmsFormEditWidget
- Parameters:
label
- the widget label texthelp
- the widget help text- See Also:
-
shouldSetDefaultWhenDisabled
Description copied from interface:I_CmsEditWidget
If this returns true, the default value will also be set as the widget value if the widget is inactive (i.e. for optional values which don't exist yet).- Specified by:
shouldSetDefaultWhenDisabled
in interfaceI_CmsEditWidget
- Returns:
- true if the default value should be set even if the widget is inactive
- See Also:
-