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
Modifier and TypeClassDescriptionprotected static interface
The 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
Modifier and TypeFieldDescriptionprotected static I_CmsInputCss
The CSS bundle used for this widget.List of style names for the help icon.static final int
The width of the label.protected com.google.gwt.user.client.ui.Panel
The label used for displaying the information icon.protected com.google.gwt.user.client.ui.Label
The label for the form row.protected com.google.gwt.user.client.ui.Panel
The widget container for the form row.static final int
The width of the opener.static final int
The default widget container width.static final int
The required right margin.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.user.client.ui.Panel
getIcon()
Gets the icon.com.google.gwt.user.client.ui.Label
getLabel()
Returns the label for the form row.static String
Returns the width of the label as a string.static String
Returns the width of the opener as a string.com.google.gwt.user.client.ui.Panel
Returns the widget container for the form row.static String
Returns the left margin of the widget container as a string.static String
Returns the left margin of the widget container as a string.void
Initializes the style for the info button.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.void
Shows the info icon and sets the information text as its title.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 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_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
-