Class CmsFieldSet

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.CmsFieldSet
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasCloseHandlers<CmsFieldSet>, com.google.gwt.event.logical.shared.HasOpenHandlers<CmsFieldSet>, 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.HasWidgets, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, Iterable<com.google.gwt.user.client.ui.Widget>

public class CmsFieldSet extends com.google.gwt.user.client.ui.Composite implements com.google.gwt.event.logical.shared.HasOpenHandlers<CmsFieldSet>, com.google.gwt.event.logical.shared.HasCloseHandlers<CmsFieldSet>, com.google.gwt.user.client.ui.HasWidgets
A panel that behaves like a HTML fieldset.

Since:
8.0.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static interface 
    The ui-binder interface for this composite.

    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 com.google.gwt.user.client.ui.HasWidgets

    com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default animation duration.
    protected com.google.gwt.user.client.ui.FlowPanel
    The content of the fieldset.
    protected com.google.gwt.user.client.ui.FlowPanel
    The wrapping panel for this fieldset.
    protected CmsLabel
    The legend of the fieldset.
    protected boolean
    Signals whether the fieldset is opened.
    protected CmsPushButton
    The image for the top and bottom arrow.
    protected com.google.gwt.user.client.ui.FlowPanel
    The legend of the fieldset.

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(com.google.gwt.user.client.ui.Widget widget)
     
    com.google.gwt.event.shared.HandlerRegistration
    addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<CmsFieldSet> handler)
     
    void
    addContent(com.google.gwt.user.client.ui.Widget w)
    Adds a widget to this field set.
    com.google.gwt.event.shared.HandlerRegistration
    addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<CmsFieldSet> handler)
     
    void
     
    com.google.gwt.user.client.ui.FlowPanel
    Returns the content panel.
    int
    Returns the count of widgets inside this fieldset.
    com.google.gwt.user.client.ui.FlowPanel
    Returns the wrapper.
    protected void
    handleClick(com.google.gwt.event.dom.client.ClickEvent e)
    Adds a click handler to the image icon of this fieldset.
    boolean
    Returns if the fieldset is opened.
    Iterator<com.google.gwt.user.client.ui.Widget>
     
    boolean
    remove(com.google.gwt.user.client.ui.Widget widget)
     
    void
    setAnimationDuration(int animDuration)
    Sets the animation duration.
    void
    setLegend(String legendText)
    Sets the text for the legend of this field set.
    void
    setOpen(boolean open)
    Sets the fieldset open, showing the content.
    void
    setOpenerVisible(boolean visible)
    Sets the opener visible.

    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 java.lang.Iterable

    forEach, spliterator
  • Field Details

    • DEFAULT_ANIMATION_DURATION

      public static final int DEFAULT_ANIMATION_DURATION
      Default animation duration.
      See Also:
    • m_content

      @UiField protected com.google.gwt.user.client.ui.FlowPanel m_content
      The content of the fieldset.
    • m_fieldset

      @UiField protected com.google.gwt.user.client.ui.FlowPanel m_fieldset
      The wrapping panel for this fieldset.
    • m_opener

      @UiField protected CmsPushButton m_opener
      The image for the top and bottom arrow.
    • m_legend

      @UiField protected CmsLabel m_legend
      The legend of the fieldset.
    • m_opened

      protected boolean m_opened
      Signals whether the fieldset is opened.
    • m_wrapper

      @UiField protected com.google.gwt.user.client.ui.FlowPanel m_wrapper
      The legend of the fieldset.
  • Constructor Details

    • CmsFieldSet

      public CmsFieldSet()
      Default constructor.

      Because this class has a default constructor, it can be used as a binder template. In other words, it can be used in other *.ui.xml files:

  • Method Details

    • add

      public void add(com.google.gwt.user.client.ui.Widget widget)
      Specified by:
      add in interface com.google.gwt.user.client.ui.HasWidgets
      See Also:
      • HasWidgets.add(com.google.gwt.user.client.ui.Widget)
    • addCloseHandler

      public com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<CmsFieldSet> handler)
      Specified by:
      addCloseHandler in interface com.google.gwt.event.logical.shared.HasCloseHandlers<CmsFieldSet>
      See Also:
      • HasCloseHandlers.addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler)
    • addContent

      public void addContent(com.google.gwt.user.client.ui.Widget w)
      Adds a widget to this field set.

      Parameters:
      w - the widget to add
    • addOpenHandler

      public com.google.gwt.event.shared.HandlerRegistration addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<CmsFieldSet> handler)
      Specified by:
      addOpenHandler in interface com.google.gwt.event.logical.shared.HasOpenHandlers<CmsFieldSet>
      See Also:
      • HasOpenHandlers.addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler)
    • clear

      public void clear()
      Specified by:
      clear in interface com.google.gwt.user.client.ui.HasWidgets
      See Also:
      • HasWidgets.clear()
    • getContentPanel

      public com.google.gwt.user.client.ui.FlowPanel getContentPanel()
      Returns the content panel.

      Returns:
      the content panel
    • getWidgetCount

      public int getWidgetCount()
      Returns the count of widgets inside this fieldset.

      Returns:
      the count of widgets inside this fieldset
    • getWrapper

      public com.google.gwt.user.client.ui.FlowPanel getWrapper()
      Returns the wrapper.

      Returns:
      the wrapper
    • isOpen

      public boolean isOpen()
      Returns if the fieldset is opened.

      Returns:
      true if the fieldset is opened
    • iterator

      public Iterator<com.google.gwt.user.client.ui.Widget> iterator()
      Specified by:
      iterator in interface com.google.gwt.user.client.ui.HasWidgets
      Specified by:
      iterator in interface Iterable<com.google.gwt.user.client.ui.Widget>
      See Also:
      • HasWidgets.iterator()
    • remove

      public boolean remove(com.google.gwt.user.client.ui.Widget widget)
      Specified by:
      remove in interface com.google.gwt.user.client.ui.HasWidgets
      See Also:
      • HasWidgets.remove(com.google.gwt.user.client.ui.Widget)
    • setAnimationDuration

      public void setAnimationDuration(int animDuration)
      Sets the animation duration.
      Parameters:
      animDuration - the animation duration
    • setLegend

      public void setLegend(String legendText)
      Sets the text for the legend of this field set.

      Parameters:
      legendText - the legend text
    • setOpen

      public void setOpen(boolean open)
      Sets the fieldset open, showing the content.

      Parameters:
      open - true to open the fieldset
    • setOpenerVisible

      public void setOpenerVisible(boolean visible)
      Sets the opener visible.

      Parameters:
      visible - true to set the opener visible
    • handleClick

      @UiHandler("m_opener") protected void handleClick(com.google.gwt.event.dom.client.ClickEvent e)
      Adds a click handler to the image icon of this fieldset.

      On click the

      Parameters:
      e - the event