本文整理了Java中com.vaadin.v7.ui.Table.isMultiSelect()
方法的一些代码示例,展示了Table.isMultiSelect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.isMultiSelect()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:isMultiSelect
暂无
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public boolean isMultiSelect() {
return component.isMultiSelect();
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
protected void setSelectedIds(Collection<Object> itemIds) {
if (component.isMultiSelect()) {
component.setValue(itemIds);
} else {
component.setValue(itemIds.size() > 0 ? itemIds.iterator().next() : null);
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
private String[] findSelectedKeys() {
LinkedList<String> selectedKeys = new LinkedList<String>();
if (isMultiSelect()) {
HashSet<?> sel = new HashSet<Object>((Set<?>) getValue());
Collection<?> vids = getVisibleItemIds();
for (Object id : vids) {
if (sel.contains(id)) {
selectedKeys.add(itemIdMapper.key(id));
}
}
} else {
Object value = getValue();
if (value == null) {
value = getNullSelectionItemId();
}
if (value != null) {
selectedKeys.add(itemIdMapper.key(value));
}
}
return selectedKeys.toArray(new String[selectedKeys.size()]);
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
isSelectable() && isMultiSelect() && variables.containsKey("selected")
&& multiSelectMode == MultiSelectMode.DEFAULT) {
handleSelectedItems(variables);
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
private void paintSelectMode(PaintTarget target) throws PaintException {
if (multiSelectMode != MultiSelectMode.DEFAULT) {
target.addAttribute("multiselectmode", multiSelectMode.ordinal());
}
if (isSelectable()) {
target.addAttribute("selectmode",
(isMultiSelect() ? "multi" : "single"));
} else {
target.addAttribute("selectmode", "none");
}
if (!isNullSelectionAllowed()) {
target.addAttribute("nsa", false);
}
// selection support
// The select variable is only enabled if selectable
if (isSelectable()) {
target.addVariable(this, "selected", findSelectedKeys());
}
}
内容来源于网络,如有侵权,请联系作者删除!