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
public class CmsFormRow extends com.google.gwt.user.client.ui.Composite
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 Classes Modifier and Type Class Description protected static interface
CmsFormRow.I_CmsFormRowUiBinder
The ui binder interface for this widget.
-
Field Summary
Fields Modifier and Type Field Description protected static I_CmsInputCss
CSS
The CSS bundle used for this widget.static java.util.List<java.lang.String>
ICON_STYLES
List of style names for the help icon.static int
LABEL_WIDTH
The width of the label.protected com.google.gwt.user.client.ui.Panel
m_icon
The label used for displaying the information icon.protected com.google.gwt.user.client.ui.Label
m_label
The label for the form row.protected com.google.gwt.user.client.ui.Panel
m_widgetContainer
The widget container for the form row.static int
OPENER_WIDTH
The width of the opener.static int
WIDGET_CONTAINER_WIDTH
The default widget container width.static int
WIDGET_MARGIN_RIGHT
The required right margin.
-
Constructor Summary
Constructors Constructor Description CmsFormRow()
The default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.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 java.lang.String
getLabelWidth()
Returns the width of the label as a string.static java.lang.String
getOpenerWidth()
Returns the width of the opener as a string.com.google.gwt.user.client.ui.Panel
getWidgetContainer()
Returns the widget container for the form row.static java.lang.String
getWidgetContainerLeftMargin()
Returns the left margin of the widget container as a string.static java.lang.String
getWidgetContainerWidth()
Returns the left margin of the widget container as a string.void
initInfoStyle()
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
setInfo(java.lang.String info, boolean isHtml)
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 Detail
-
LABEL_WIDTH
public static final int LABEL_WIDTH
The width of the label.- See Also:
- Constant Field Values
-
OPENER_WIDTH
public static final int OPENER_WIDTH
The width of the opener.- See Also:
- Constant Field Values
-
WIDGET_CONTAINER_WIDTH
public static final int WIDGET_CONTAINER_WIDTH
The default widget container width.- See Also:
- Constant Field Values
-
WIDGET_MARGIN_RIGHT
public static final int WIDGET_MARGIN_RIGHT
The required right margin.- See Also:
- Constant Field Values
-
CSS
protected static I_CmsInputCss CSS
The CSS bundle used for this widget.
-
ICON_STYLES
public static java.util.List<java.lang.String> ICON_STYLES
List of style names for the help icon.
-
m_icon
@UiField protected com.google.gwt.user.client.ui.Panel m_icon
The label used for displaying the information icon.
-
m_label
@UiField protected com.google.gwt.user.client.ui.Label m_label
The label for the form row.
-
m_widgetContainer
@UiField protected com.google.gwt.user.client.ui.Panel m_widgetContainer
The widget container for the form row.
-
-
Constructor Detail
-
CmsFormRow
public CmsFormRow()
The default constructor.
-
-
Method Detail
-
getLabelWidth
public static java.lang.String getLabelWidth()
Returns the width of the label as a string.- Returns:
- the width of the label as a string
-
getOpenerWidth
public static java.lang.String getOpenerWidth()
Returns the width of the opener as a string.- Returns:
- the width of the opener as a string
-
getWidgetContainerLeftMargin
public static java.lang.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
public static java.lang.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
public com.google.gwt.user.client.ui.Panel getIcon()
Gets the icon.- Returns:
- the icon
-
getLabel
public com.google.gwt.user.client.ui.Label getLabel()
Returns the label for the form row.- Returns:
- the label for the form row
-
getWidgetContainer
public com.google.gwt.user.client.ui.Panel getWidgetContainer()
Returns the widget container for the form row.- Returns:
- the widget container for the form row
-
initInfoStyle
public void initInfoStyle()
Initializes the style for the info button.
-
setInfo
public void setInfo(java.lang.String info, boolean isHtml)
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
-
-