本文整理了Java中com.vaadin.ui.Grid.getSelectedItems()
方法的一些代码示例,展示了Grid.getSelectedItems()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grid.getSelectedItems()
方法的具体详情如下:
包路径:com.vaadin.ui.Grid
类名称:Grid
方法名:getSelectedItems
[英]This method is a shorthand that delegates to the currently set selection model.
[中]此方法是委托给当前设置的选择模型的简写方法。
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public Set<E> getSelected() {
return component.getSelectedItems();
}
代码示例来源:origin: vaadin/material-theme-fw8
public void addPersistentActions(Button... buttons) {
actionButtonLayout.addComponents(buttons);
for (Button button : buttons) {
persistentActions.add(button);
button.setVisible(grid.getSelectedItems().isEmpty());
}
}
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin
@Override
public Set<T> getSelectedItems() {
if (getSelectionMode() == SelectionMode.NONE) {
return Collections.emptySet();
}
return getGrid().getSelectedItems();
}
代码示例来源:origin: vaadin/material-theme-fw8
public void addContextualActions(Button... buttons) {
actionButtonLayout.addComponents(buttons);
for (Button button : buttons) {
contextualActions.add(button);
button.setVisible(!grid.getSelectedItems().isEmpty());
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
protected void initContextMenu() {
contextMenu = new CubaGridContextMenu<>(component);
contextMenu.addGridBodyContextMenuListener(event -> {
if (!component.getSelectedItems().contains(event.getItem())) {
// In the multi select model 'setSelected' adds item to selected set,
// but, in case of context click, we want to have a single selected item,
// if it isn't in a set of already selected items
if (isMultiSelect()) {
component.deselectAll();
}
setSelected(event.getItem());
}
});
}
代码示例来源:origin: vaadin/material-theme-fw8
int size = grid.getSelectedItems().size();
if (size > 0) {
titleLabel.setValue(size + (size == 1 ? " item selected" : " items selected"));
代码示例来源:origin: jreznot/electron-java-app
removeButton.setEnabled(false);
removeButton.addClickListener(event -> {
Set<Task> selectedItems = tasksGrid.getSelectedItems();
tasks.removeAll(selectedItems);
dataProvider.refreshAll();
内容来源于网络,如有侵权,请联系作者删除!