Class 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, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>, I_CmsTruncable

    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, I_CmsTruncable
    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  CmsFieldSet.I_CmsFieldSetUiBinder
      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 int DEFAULT_ANIMATION_DURATION
      Default animation duration.
      protected com.google.gwt.user.client.ui.FlowPanel m_content
      The content of the fieldset.
      protected com.google.gwt.user.client.ui.FlowPanel m_fieldset
      The wrapping panel for this fieldset.
      protected CmsLabel m_legend
      The legend of the fieldset.
      protected boolean m_opened
      Signals whether the fieldset is opened.
      protected CmsPushButton m_opener
      The image for the top and bottom arrow.
      protected com.google.gwt.user.client.ui.FlowPanel m_wrapper
      The legend of the fieldset.
      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsFieldSet()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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 clear()  
      com.google.gwt.user.client.ui.FlowPanel getContentPanel()
      Returns the content panel.
      int getWidgetCount()
      Returns the count of widgets inside this fieldset.
      com.google.gwt.user.client.ui.FlowPanel getWrapper()
      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 isOpen()
      Returns if the fieldset is opened.
      java.util.Iterator<com.google.gwt.user.client.ui.Widget> iterator()  
      boolean remove​(com.google.gwt.user.client.ui.Widget widget)  
      void setAnimationDuration​(int animDuration)
      Sets the animation duration.
      void setLegend​(java.lang.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.
      void truncate​(java.lang.String textMetricsKey, int clientWidth)
      Truncates long text and sets the original text to the title attribute.
      • 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 Detail

      • 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_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 Detail

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

      • 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 java.util.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 java.lang.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​(java.lang.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