2 * Copyright 2000-2018 Vaadin Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
16 package com.vaadin.v7.client.widget.grid.selection;
18 import java.util.Collection;
19 import java.util.Collections;
21 import com.vaadin.client.data.DataSource.RowHandle;
22 import com.vaadin.v7.client.renderers.Renderer;
23 import com.vaadin.v7.client.widgets.Grid;
26 * No-row selection model.
31 public class SelectionModelNone<T> extends AbstractRowHandleSelectionModel<T>
32 implements SelectionModel.None<T> {
35 public boolean isSelected(T row) {
40 public Renderer<Boolean> getSelectionColumnRenderer() {
45 public void setGrid(Grid<T> grid) {
55 public Collection<T> getSelectedRows() {
56 return Collections.emptySet();
60 protected boolean selectByHandle(RowHandle<T> handle)
61 throws UnsupportedOperationException {
62 throw new UnsupportedOperationException(
63 "This selection model " + "does not support selection");
67 protected boolean deselectByHandle(RowHandle<T> handle)
68 throws UnsupportedOperationException {
69 throw new UnsupportedOperationException(
70 "This selection model " + "does not support deselection");