2 pages

CheckBoxGroup and RadioButtonGroup · Vaadin - Vaadin

of 2
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Criação de CheckBoxGroup and RadioButtonGroup · Vaadin 8
  23/08/2017CheckBoxGroup and RadioButtonGroup · Vaadin - vaadin.comhttps://vaadin.com/docs/-/part/framework/components/components-optiongroups.html1/2 RadioButtonGroup is a single selection component thatallows selection from a group of radiobuttons. CheckBoxGroup  is a multiselection componentwhere items are displayed as check boxes. The commonselection component features are described in Selection Components . Figure 1. RadioButtonGroup and CheckBoxGroup // A single-select radio button group  RadioButtonGroup< String > single = new  RadioButtonGroup<>( Single Selection ); single.setItems( Single , Sola , Yksi ); // A multi-select check box group  CheckBoxGroup< String > multi = new  CheckBoxGroup<>( Multiple Selection ); multi.setItems( Many , Muchos , Monta ); RadioButtonGroup and CheckBoxGroup shows the RadioButtonGroup and CheckBoxGroup .You can also create check boxes individually using the CheckBox  class, as described in CheckBox . Theadvantages of the CheckBoxGroup component are that as it maintains the individual check box objects, you canget an array of the currently selected items easily, and that you can easily change the appearance of a singlecomponent and use it with a Binder  .You can disable individual items in a RadioButtonGroup  or a CheckBoxGroup  with setItemEnabledProvider() .The user can not select or deselect disabled items in a CheckBoxGroup , but in a RadioButtonGroup  the user can change the selection from a disabled to an enabled item. The selections can be changed programmaticallyregardless of whether an item is enabled or disabled. // Have a radio button group with some items  RadioButtonGroup< String > group = new  RadioButtonGroup<>( My Disabled Group ); group.setItems( One , Two , Three ); CheckBoxGroup and RadioButtonGroup Disabling Items  23/08/2017CheckBoxGroup and RadioButtonGroup · Vaadin - vaadin.comhttps://vaadin.com/docs/-/part/framework/components/components-optiongroups.html2/2 // Disable one item  group.setItemEnabledProvider(item-> ! Two .equals(item)); Figure 2. RadioButtonGroup with a Disabled Item Setting an item as disabled turns on the v-disabled  style for it. .v-select-optiongroup  {} .v-select-option.v-checkbox  {} .v-select-option.v-radiobutton  {} The v-select-optiongroup  is the overall style for the component. Each check box will have the v-checkbox  style, borrowed from the CheckBox component, and each radio button the v-radiobutton  style.Both the radio buttons and check boxes will also have the v-select-option  style that allows stylingregardless of the option type. Disabled items have additionally the v-disabled  style.The options are normally laid out vertically. You can switch to horizontal layout by using the stylename ValoTheme.OPTIONGROUP_HORIZONTAL with addStyleName() . CSS Style Rules Horizontal Layout
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks