本文整理了Java中com.vaadin.v7.ui.Table.select()
方法的一些代码示例,展示了Table.select()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.select()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:select
[英]Holds value of property selectable.
[中]保存属性的值。
代码示例来源:origin: viritin/viritin
public void select(ET objectToSelect) {
if (!table.isSelected(objectToSelect)) {
table.select(objectToSelect);
getEditedCollection().add(objectToSelect);
}
}
代码示例来源: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) {
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
/**
* Adds the handler.
*/
private void addHandler() {
org.opennms.netmgt.config.datacollection.Parameter p = new org.opennms.netmgt.config.datacollection.Parameter();
p.setKey("New Parameter");
p.setValue("New Value");
table.select(container.addOnmsBean(p));
}
代码示例来源:origin: OpenNMS/opennms
/**
* Adds the handler.
*/
private void addHandler() {
MibObj obj = new MibObj();
obj.setOid(".1.1.1.1");
obj.setInstance("0");
obj.setType("gauge");
obj.setAlias("test");
table.select(container.addOnmsBean(obj));
}
代码示例来源:origin: OpenNMS/opennms
categoriesMap.put(onmsCategory.getId(), onmsCategory);
if (def.containsCategory(onmsCategory.getName())) {
categoriesTable.select(onmsCategory.getId());
内容来源于网络,如有侵权,请联系作者删除!