本文整理了Java中com.google.gwt.user.client.ui.ListBox.isMultipleSelect()
方法的一些代码示例,展示了ListBox.isMultipleSelect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListBox.isMultipleSelect()
方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.ListBox
类名称:ListBox
方法名:isMultipleSelect
[英]Gets whether this list allows multiple selection.
[中]获取此列表是否允许多个选择。
代码示例来源:origin: GwtMaterialDesign/gwt-material
/**
* Gets whether this list allows multiple selection.
*
* @return <code>true</code> if multiple selection is allowed
*/
public boolean isMultipleSelect() {
return listBox.isMultipleSelect();
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material
/**
* Gets whether this list allows multiple selection.
*
* @return <code>true</code> if multiple selection is allowed
*/
public boolean isMultipleSelect() {
return listBox.isMultipleSelect();
}
代码示例来源:origin: ltearno/hexa.tools
@Override
public Object getValue() {
if(listBox.isMultipleSelect()) {
List<String> selectedItems = new ArrayList<>();
for (int i = 0; i < listBox.getItemCount(); i++) {
if (listBox.isItemSelected(i)) {
selectedItems.add(listBox.getValue(i));
}
}
return selectedItems;
}
else {
return listBox.getSelectedValue();
}
}
代码示例来源:origin: fr.lteconsulting/hexa.binding.gwt
@Override
public Object getValue() {
if(listBox.isMultipleSelect()) {
List<String> selectedItems = new ArrayList<>();
for (int i = 0; i < listBox.getItemCount(); i++) {
if (listBox.isItemSelected(i)) {
selectedItems.add(listBox.getValue(i));
}
}
return selectedItems;
}
else {
return listBox.getSelectedValue();
}
}
内容来源于网络,如有侵权,请联系作者删除!