com.vaadin.client.ui.

Class VCheckBoxGroup

  • All Implemented Interfaces:

    com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.dom.client.HasAllFocusHandlers, com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, Focusable, Field

    public class VCheckBoxGroup
    extends FocusableFlowPanelComposite
    implements Field, com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.user.client.ui.HasEnabled

    The client-side widget for the CheckBoxGroup component.

    Since:

    8.0

    Author:

    Vaadin Ltd.

    • Nested Class Summary

      • 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
    • Constructor Summary

      Constructors
      Constructor Description
      VCheckBoxGroup()  
    • Method Summary

      All Methods
      Modifier and Type Method Description
      Registration addSelectionChangeHandler​(BiConsumer<elemental.json.JsonObject,​Boolean> selectionChanged)  
      void buildOptions​(List<elemental.json.JsonObject> items)  
      void focus()

      Set focus to the first check box.

      elemental.json.JsonObject getItem​(com.google.gwt.dom.client.Element element)

      Returns the JsonObject used to populate the CheckBox widget that contains given Element.

      boolean isEnabled()  
      boolean isHtmlContentAllowed()  
      boolean isReadonly()  
      void onClick​(com.google.gwt.event.dom.client.ClickEvent event)  
      void setEnabled​(boolean enabled)  
      void setHtmlContentAllowed​(boolean htmlContentAllowed)  
      protected void setOptionEnabled​(VCheckBox checkBox, elemental.json.JsonObject item)

      Updates the checkbox's enabled state according to the widget's enabled, read only and the item's enabled.

      protected void setOptionReadOnly​(VCheckBox checkBox, elemental.json.JsonObject item)  
      void setReadonly​(boolean readonly)  
      void setTabIndex​(int tabIndex)  
      • Methods inherited from class com.google.gwt.user.client.ui.Composite

        claimElement, 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 interface com.google.gwt.event.shared.HasHandlers

        fireEvent
    • Constructor Detail

      • VCheckBoxGroup

        public VCheckBoxGroup()
    • Method Detail

      • buildOptions

        public void buildOptions​(List<elemental.json.JsonObject> items)
      • getItem

        public elemental.json.JsonObject getItem​(com.google.gwt.dom.client.Element element)

        Returns the JsonObject used to populate the CheckBox widget that contains given Element.

        Parameters:

        element - the element to search for

        Returns:

        the related JsonObject; null if not found

        Since:

        8.2

      • onClick

        public void onClick​(com.google.gwt.event.dom.client.ClickEvent event)

        Specified by:

        onClick in interface com.google.gwt.event.dom.client.ClickHandler

      • setTabIndex

        public void setTabIndex​(int tabIndex)
      • setOptionEnabled

        protected void setOptionEnabled​(VCheckBox checkBox,
                                        elemental.json.JsonObject item)

        Updates the checkbox's enabled state according to the widget's enabled, read only and the item's enabled.

        Parameters:

        checkBox - the checkbox to update

        item - the item for the checkbox

      • setOptionReadOnly

        protected void setOptionReadOnly​(VCheckBox checkBox,
                                         elemental.json.JsonObject item)
      • isHtmlContentAllowed

        public boolean isHtmlContentAllowed()
      • setHtmlContentAllowed

        public void setHtmlContentAllowed​(boolean htmlContentAllowed)
      • isEnabled

        public boolean isEnabled()

        Specified by:

        isEnabled in interface com.google.gwt.user.client.ui.HasEnabled

      • isReadonly

        public boolean isReadonly()
      • setReadonly

        public void setReadonly​(boolean readonly)
      • setEnabled

        public void setEnabled​(boolean enabled)

        Specified by:

        setEnabled in interface com.google.gwt.user.client.ui.HasEnabled

      • addSelectionChangeHandler

        public Registration addSelectionChangeHandler​(BiConsumer<elemental.json.JsonObject,​Boolean> selectionChanged)