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 
    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

    Fields
    Modifier and Type
    Field
    Description
    protected static I_CmsInputCss
    The CSS bundle used for this widget.
    static List<String>
    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

    Constructors
    Constructor
    Description
    The default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.gwt.user.client.ui.Panel
    Gets the icon.
    com.google.gwt.user.client.ui.Label
    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
    setInfo(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • CmsFormRow

      public CmsFormRow()
      The default constructor.
  • Method Details

    • getLabelWidth

      public static String getLabelWidth()
      Returns the width of the label as a string.

      Returns:
      the width of the label as a string
    • getOpenerWidth

      public static 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 icon
      dataSupplier - 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(String info, boolean isHtml)
      Shows the info icon and sets the information text as its title.

      Parameters:
      info - the info
      isHtml - true if info should be interpreted as HTML rather than plain text