本文整理了Java中com.vaadin.ui.Grid.deselect()
方法的一些代码示例,展示了Grid.deselect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grid.deselect()
方法的具体详情如下:
包路径:com.vaadin.ui.Grid
类名称:Grid
方法名:deselect
[英]This method is a shorthand that delegates to the currently set selection model.
[中]此方法是委托给当前设置的选择模型的简写方法。
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void deselect(E item) {
checkNotNullArgument(item);
component.deselect(item);
}
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin
@Override
public void deselect(T item) {
if (getSelectionMode() == SelectionMode.NONE) {
throw new IllegalStateException("The item listing is not selectable");
}
if (item != null) {
getGrid().deselect(item);
}
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void onAdd() {
metaDataGrid.deselect(metaDataGrid.getSelectedRow());
clearFields();
enableEditing();
addIcon.setEnabled(true);
}
代码示例来源:origin: eclipse/hawkbit
private void onAdd() {
metaDataGrid.deselect(metaDataGrid.getSelectedRow());
clearFields();
enableEditing();
addIcon.setEnabled(true);
}
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin
@Override
public boolean removeItem(T item) {
ObjectUtils.argumentNotNull(item, "Item must be not null");
boolean removed = false;
if (isBuffered()) {
removed = requireDataSource().remove(item);
// check commit on remove
if (isCommitOnRemove()) {
commit();
}
if (removed && getSelectionMode() != Selectable.SelectionMode.NONE) {
getGrid().deselect(item);
}
} else {
if (requireDataSource().getConfiguration().getCommitHandler().isPresent()) {
requireDataSource().getConfiguration().getCommitHandler().get().commit(Collections.emptySet(),
Collections.emptySet(), Collections.singleton(item));
removed = true;
}
}
// refresh
getGrid().getDataProvider().refreshAll();
return removed;
}
代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin
@Override
public void deselect(T item) {
ObjectUtils.argumentNotNull(item, "Item must be not null");
switch (getRenderingMode()) {
case GRID:
getGrid().deselect(requireDataSource().getId(item));
break;
case TABLE:
getTable().unselect(requireDataSource().getId(item));
break;
default:
break;
}
}
代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin
@Override
public boolean removeItem(T item) {
ObjectUtils.argumentNotNull(item, "Item must be not null");
final Object id = requireDataSource().getId(item);
boolean removed = requireDataSource().remove(item);
// check commit on remove
if (isCommitOnRemove()) {
commit();
}
if (removed && id != null && getSelectionMode() != Selectable.SelectionMode.NONE) {
switch (getRenderingMode()) {
case GRID:
getGrid().deselect(id);
break;
case TABLE:
getTable().unselect(id);
break;
default:
break;
}
}
return removed;
}
内容来源于网络,如有侵权,请联系作者删除!