Class CmsFormRow
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.gwt.client.ui.input.form.CmsFormRow
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,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
A row in a properties form.
This widget contains both a label and a panel into which an input widget for the form field can be placed. These widgets are next to each other horizontally.
- Since:
- 8.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceThe ui binder interface for this widget.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 static I_CmsInputCssThe CSS bundle used for this widget.List of style names for the help icon.static final intThe width of the label.protected com.google.gwt.user.client.ui.PanelThe label used for displaying the information icon.protected com.google.gwt.user.client.ui.LabelThe label for the form row.protected com.google.gwt.user.client.ui.LabelTag to show next to the field label.protected com.google.gwt.user.client.ui.PanelThe widget container for the form row.static final intThe width of the opener.static final intThe default widget container width.static final intThe required right margin.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.user.client.ui.PanelgetIcon()Gets the icon.com.google.gwt.user.client.ui.LabelgetLabel()Returns the label for the form row.static StringReturns the width of the label as a string.static StringReturns the width of the opener as a string.com.google.gwt.user.client.ui.PanelReturns the widget container for the form row.static StringReturns the left margin of the widget container as a string.static StringReturns the left margin of the widget container as a string.voidInitializes the style for the info button.static voidinstallTooltipEventHandlers(com.google.gwt.user.client.ui.Panel icon, com.google.common.base.Supplier<CmsFieldTooltip.Data> dataSupplier) Installs the DOM event handlers for displaying tooltips on a help icon.voidShows the info icon and sets the information text as its title.voidSets the tag to show next to the field label.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, toString
-
Field Details
-
LABEL_WIDTH
The width of the label.- See Also:
-
OPENER_WIDTH
The width of the opener.- See Also:
-
WIDGET_CONTAINER_WIDTH
The default widget container width.- See Also:
-
WIDGET_MARGIN_RIGHT
The required right margin.- See Also:
-
CSS
The CSS bundle used for this widget. -
ICON_STYLES
List of style names for the help icon. -
m_icon
The label used for displaying the information icon. -
m_label
The label for the form row. -
m_tag
Tag to show next to the field label. -
m_widgetContainer
The widget container for the form row.
-
-
Constructor Details
-
CmsFormRow
public CmsFormRow()The default constructor.
-
-
Method Details
-
getLabelWidth
Returns the width of the label as a string.- Returns:
- the width of the label as a string
-
getOpenerWidth
Returns the width of the opener as a string.- Returns:
- the width of the opener as a string
-
getWidgetContainerLeftMargin
Returns the left margin of the widget container as a string.- Returns:
- the left margin of the widget container as a string
-
getWidgetContainerWidth
Returns the left margin of the widget container as a string.- Returns:
- the left margin of the widget container as a string
-
installTooltipEventHandlers
public static void installTooltipEventHandlers(com.google.gwt.user.client.ui.Panel icon, com.google.common.base.Supplier<CmsFieldTooltip.Data> dataSupplier) Installs the DOM event handlers for displaying tooltips on a help icon.The supplier passed in should not create a new tooltip data instance each time, but cache the different possible tooltip data instances.
- Parameters:
icon- the help icondataSupplier- provides the tooltip data at the time the DOM events occur
-
getIcon
Gets the icon.- Returns:
- the icon
-
getLabel
Returns the label for the form row.- Returns:
- the label for the form row
-
getWidgetContainer
Returns the widget container for the form row.- Returns:
- the widget container for the form row
-
initInfoStyle
Initializes the style for the info button. -
setInfo
Shows the info icon and sets the information text as its title.- Parameters:
info- the infoisHtml- true if info should be interpreted as HTML rather than plain text
-
setTag
Sets the tag to show next to the field label.To hide the tag, set it to null.
- Parameters:
tag- the tag to display
-