From 4c2adcefb2dee1b296eef31a8d4944b1b89226e5 Mon Sep 17 00:00:00 2001
From: Denis Anisimov <denis@vaadin.com>
Date: Fri, 30 Sep 2016 16:56:44 +0300
Subject: Update documentation (+javadoc) references to obsolete OptionGroup
 #237.

Change-Id: Ie90e91f61a5795c90de3c690c3b6af80ec1448d9
---
 .../components/components-selection.asciidoc       | 35 +++++++++-------------
 1 file changed, 14 insertions(+), 21 deletions(-)

(limited to 'documentation/components/components-selection.asciidoc')

diff --git a/documentation/components/components-selection.asciidoc b/documentation/components/components-selection.asciidoc
index 6078fd886e..a5ec2f086f 100644
--- a/documentation/components/components-selection.asciidoc
+++ b/documentation/components/components-selection.asciidoc
@@ -24,8 +24,11 @@ A vertical list box for selecting items in either single or multiple selection m
 Provides selection using the native selection component of the browser, typically a drop-down list for single selection and a multi-line list in multiselect mode.
 This uses the [literal]#++<select>++# element in HTML.
 
-[classname]#OptionGroup# (<<components-optiongroup#components.optiongroup,"OptionGroup">>)::
-Shows the items as a vertically arranged group of radio buttons in the single selection mode and of check boxes in multiple selection mode.
+[classname]#RadioButtonGroup# (<<components-optiongroups#components.optiongroups,"CheckBoxGroup and RadioButtonGroup">>)::
+Shows the items as a vertically arranged group of radio buttons in single selection mode.
+
+[classname]#CheckBoxGroup# (<<components-optiongroups#components.optiongroups,"CheckBoxGroup and RadioButtonGroup">>)::
+Shows the items as a vertically arranged group of check boxes in multiple selection mode.
 
 [classname]#TwinColSelect# (<<components-twincolselect#components.twincolselect, "TwinColSelect">>)::
 Shows two list boxes side by side where the user can select items from a list of available items and move them to a list of selected items using control buttons.
@@ -304,22 +307,15 @@ endif::web[]
 [[components.selection.multiple]]
 == Multiple Selection
 
-Some selection components, such as [classname]#OptionGroup# and
-[classname]#ListSelect# support a multiple selection mode, which you can enable
-with [methodname]#setSelectionMode(SelectionMode.MULTI)#.
-For [classname]#TwinColSelect#, which is especially intended for
-multiple selection, it is enabled by default.
-
+Some selection components, such as [classname]#CheckBoxGroup#,
+[classname]#ListSelect# and [classname]#TwinColSelect# are multiselect components, 
+they extend [classname]#AbstractMultiSelect# class.
 
-[source, java]
-----
-myselect.setSelectionMode(SelectionMode.MULTI);
-----
 
-In multiple selection mode the [interfacename]#Select# value is a
-[classname]#Collection# of the items of the currently selected items.
-You can get and set the selection with the [methodname]#getSelected()# and
-[methodname]#setSelected()# methods as usual.
+Multiselect components use the [interfacename]#SelectionModel.Multi# selection model.
+This model allows to select multiple items.
+You can get and set the selection with the [methodname]#SelectionModel.getSelectedItems()# and
+[methodname]#SelectionModel.Multi.selectItems()# methods.
 
 A change in the selection will trigger a [classname]#SelectionChange#, which
 you can handle with a [classname]#SelectionChangeListener#. The
@@ -333,14 +329,11 @@ ListSelect<String> select = new ListSelect<>("My Selection");
 select.setItems("Mercury", "Venus", "Earth",
     "Mars", "Jupiter", "Saturn", "Uranus", "Neptune");
 
-// Multiple selection mode
-select.setSelectionMode(SelectionMode.MULTI);
-
 // Feedback on value changes
-select.addSelectionChangeListener(event -> {
+select.addSelectionListener(event -> {
         // Some feedback
         layout.addComponent(new Label("Selected: " +
-            event.getSelected()));
+            event.getNewSelection()));
     }
 });
 
-- 
cgit v1.2.3

