本文整理了Java中com.vaadin.v7.ui.Table.unselect()
方法的一些代码示例,展示了Table.unselect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.unselect()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:unselect
暂无
代码示例来源:origin: viritin/viritin
public void unSelect(ET objectToDeselect) {
if (table.isSelected(objectToDeselect)) {
table.unselect(objectToDeselect);
getEditedCollection().remove(objectToDeselect);
}
}
代码示例来源:origin: OpenNMS/opennms
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
ColumnDef columnDef = (ColumnDef) columnsTable.getValue();
if (columnDef != null) {
int columnDefIndex = columnOrder.get(columnDef);
ColumnDef columnDefToSwap = null;
for (Map.Entry<ColumnDef, Integer> entry : columnOrder.entrySet()) {
if (entry.getValue().intValue() == columnDefIndex - 1) {
columnDefToSwap = entry.getKey();
break;
}
}
if (columnDefToSwap != null) {
columnsTable.unselect(columnDef);
columnOrder.remove(columnDef);
columnOrder.remove(columnDefToSwap);
columnOrder.put(columnDef, columnDefIndex - 1);
columnOrder.put(columnDefToSwap, columnDefIndex);
columns.sort(new Object[]{"label"}, new boolean[]{true});
columnsTable.refreshRowCache();
columnsTable.select(columnDef);
}
}
}
});
代码示例来源:origin: OpenNMS/opennms
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
ColumnDef columnDef = (ColumnDef) columnsTable.getValue();
if (columnDef != null) {
int columnDefIndex = columnOrder.get(columnDef);
ColumnDef columnDefToSwap = null;
for (Map.Entry<ColumnDef, Integer> entry : columnOrder.entrySet()) {
if (entry.getValue().intValue() == columnDefIndex + 1) {
columnDefToSwap = entry.getKey();
break;
}
}
if (columnDefToSwap != null) {
columnsTable.unselect(columnDef);
columnOrder.remove(columnDef);
columnOrder.remove(columnDefToSwap);
columnOrder.put(columnDef, columnDefIndex + 1);
columnOrder.put(columnDefToSwap, columnDefIndex);
columns.sort(new Object[]{"label"}, new boolean[]{true});
columnsTable.refreshRowCache();
columnsTable.select(columnDef);
}
}
}
});
代码示例来源:origin: OpenNMS/opennms
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
RowDef rowDef = (RowDef) rowsTable.getValue();
if (rowDef != null) {
int rowDefIndex = rowOrder.get(rowDef);
RowDef rowDefToSwap = null;
for (Map.Entry<RowDef, Integer> entry : rowOrder.entrySet()) {
if (entry.getValue().intValue() == rowDefIndex - 1) {
rowDefToSwap = entry.getKey();
break;
}
}
if (rowDefToSwap != null) {
rowsTable.unselect(rowDef);
rowOrder.remove(rowDef);
rowOrder.remove(rowDefToSwap);
rowOrder.put(rowDef, rowDefIndex - 1);
rowOrder.put(rowDefToSwap, rowDefIndex);
rows.sort(new Object[]{"label"}, new boolean[]{true});
rowsTable.refreshRowCache();
rowsTable.select(rowDef);
}
}
}
});
代码示例来源:origin: OpenNMS/opennms
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
RowDef rowDef = (RowDef) rowsTable.getValue();
if (rowDef != null) {
int rowDefIndex = rowOrder.get(rowDef);
RowDef rowDefToSwap = null;
for (Map.Entry<RowDef, Integer> entry : rowOrder.entrySet()) {
if (entry.getValue().intValue() == rowDefIndex + 1) {
rowDefToSwap = entry.getKey();
break;
}
}
if (rowDefToSwap != null) {
rowsTable.unselect(rowDef);
rowOrder.remove(rowDef);
rowOrder.remove(rowDefToSwap);
rowOrder.put(rowDef, rowDefIndex + 1);
rowOrder.put(rowDefToSwap, rowDefIndex);
rows.sort(new Object[]{"label"}, new boolean[]{true});
rowsTable.refreshRowCache();
rowsTable.select(rowDef);
}
}
}
});
代码示例来源:origin: OpenNMS/opennms
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
ColumnDef columnDef = (ColumnDef) columnsTable.getValue();
if (columnDef != null) {
columnsTable.unselect(columnDef);
columns.removeItem(columnDef);
}
columnsTable.refreshRowCache();
}
});
代码示例来源:origin: OpenNMS/opennms
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
RowDef rowDef = (RowDef) rowsTable.getValue();
if (rowDef != null) {
rowsTable.unselect(rowDef);
rows.removeItem(rowDef);
}
rowsTable.refreshRowCache();
}
});
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void unselectGoesBackToEmptySelection() throws Exception {
table.unselect(B); // B is already selected in #setUp
verify(listener, only()).onItemSelection((Set) argThat(empty()));
}
}
内容来源于网络,如有侵权,请联系作者删除!