本文整理了Java中com.vaadin.v7.ui.Table.getItemIds()
方法的一些代码示例,展示了Table.getItemIds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getItemIds()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:getItemIds
[英]Gets items ids from a range of key values
[中]从一系列键值中获取项ID
代码示例来源:origin: OpenNMS/opennms
public Set<Integer> getSelectedIds(Table source) {
if (m_selectAll) {
Set<Integer> selected = new TreeSet<Integer>();
for (Object eachItemId : source.getItemIds()) {
Property<Integer> property = source.getContainerProperty(eachItemId, m_valueProperty);
if (property == null) continue;
selected.add(property.getValue());
}
//remove unselected
selected.removeAll(m_notSelectedCheckboxes);
return selected;
}
return Collections.unmodifiableSet(m_selectedCheckboxes);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void selectAll() {
if (isMultiSelect()) {
component.setValue(component.getItemIds());
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void scrollTo(E item) {
Preconditions.checkNotNullArgument(item);
if (!component.getItemIds().contains(item.getId())) {
throw new IllegalArgumentException("Unable to find item in Table");
}
component.setCurrentPageFirstItemId(item.getId());
}
代码示例来源:origin: OpenNMS/opennms
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
getUI().addWindow(new SurveillanceViewConfigurationCategoryWindow(surveillanceViewService, rowsTable.getItemIds(), (RowDef) rowsTable.getValue(), new SurveillanceViewConfigurationCategoryWindow.SaveActionListener() {
@Override
public void save(Def def) {
RowDef rowToBeReplaced = (RowDef) rowsTable.getValue();
int index = rowOrder.get(rowToBeReplaced);
rows.removeItem(rowToBeReplaced);
rowOrder.remove(rowToBeReplaced);
rows.addItem((RowDef) def);
rowOrder.put((RowDef) def, index);
rows.sort(new Object[]{"label"}, new boolean[]{true});
rowsTable.refreshRowCache();
}
}));
}
});
代码示例来源:origin: OpenNMS/opennms
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
getUI().addWindow(new SurveillanceViewConfigurationCategoryWindow(surveillanceViewService, columnsTable.getItemIds(), (ColumnDef) columnsTable.getValue(), new SurveillanceViewConfigurationCategoryWindow.SaveActionListener() {
@Override
public void save(Def def) {
ColumnDef columnToBeReplaced = (ColumnDef) columnsTable.getValue();
int index = columnOrder.get(columnToBeReplaced);
columns.removeItem(columnToBeReplaced);
columnOrder.remove(columnToBeReplaced);
columns.addItem((ColumnDef) def);
columnOrder.put((ColumnDef) def, index);
columns.sort(new Object[]{"label"}, new boolean[]{true});
columnsTable.refreshRowCache();
}
}));
}
});
代码示例来源:origin: OpenNMS/opennms
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
getUI().addWindow(new SurveillanceViewConfigurationCategoryWindow(surveillanceViewService, columnsTable.getItemIds(), new ColumnDef(), new SurveillanceViewConfigurationCategoryWindow.SaveActionListener() {
@Override
public void save(Def def) {
columns.addItem((ColumnDef) def);
columnOrder.put((ColumnDef) def, columnOrder.size());
columns.sort(new Object[]{"label"}, new boolean[]{true});
columnsTable.refreshRowCache();
}
}));
}
});
代码示例来源:origin: OpenNMS/opennms
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
getUI().addWindow(new SurveillanceViewConfigurationCategoryWindow(surveillanceViewService, rowsTable.getItemIds(), new RowDef(), new SurveillanceViewConfigurationCategoryWindow.SaveActionListener() {
@Override
public void save(Def def) {
rows.addItem((RowDef) def);
rowOrder.put((RowDef) def, rowOrder.size());
rows.sort(new Object[]{"label"}, new boolean[]{true});
rowsTable.refreshRowCache();
}
}));
}
});
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
List<?> itemIds = getItemIds(firstIndex, rows);
for (int i = 0; i < rows && i < itemIds.size(); i++) {
Object id = itemIds.get(i);
内容来源于网络,如有侵权,请联系作者删除!