com.vaadin.v7.ui.Table.select()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(326)

本文整理了Java中com.vaadin.v7.ui.Table.select()方法的一些代码示例,展示了Table.select()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.select()方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:select

Table.select介绍

[英]Holds value of property selectable.
[中]保存属性的值。

代码示例

代码示例来源:origin: viritin/viritin

  1. public void select(ET objectToSelect) {
  2. if (!table.isSelected(objectToSelect)) {
  3. table.select(objectToSelect);
  4. getEditedCollection().add(objectToSelect);
  5. }
  6. }

代码示例来源:origin: OpenNMS/opennms

  1. @Override
  2. public void buttonClick(Button.ClickEvent clickEvent) {
  3. RowDef rowDef = (RowDef) rowsTable.getValue();
  4. if (rowDef != null) {
  5. int rowDefIndex = rowOrder.get(rowDef);
  6. RowDef rowDefToSwap = null;
  7. for (Map.Entry<RowDef, Integer> entry : rowOrder.entrySet()) {
  8. if (entry.getValue().intValue() == rowDefIndex - 1) {
  9. rowDefToSwap = entry.getKey();
  10. break;
  11. }
  12. }
  13. if (rowDefToSwap != null) {
  14. rowsTable.unselect(rowDef);
  15. rowOrder.remove(rowDef);
  16. rowOrder.remove(rowDefToSwap);
  17. rowOrder.put(rowDef, rowDefIndex - 1);
  18. rowOrder.put(rowDefToSwap, rowDefIndex);
  19. rows.sort(new Object[]{"label"}, new boolean[]{true});
  20. rowsTable.refreshRowCache();
  21. rowsTable.select(rowDef);
  22. }
  23. }
  24. }
  25. });

代码示例来源:origin: OpenNMS/opennms

  1. @Override
  2. public void buttonClick(Button.ClickEvent clickEvent) {
  3. RowDef rowDef = (RowDef) rowsTable.getValue();
  4. if (rowDef != null) {
  5. int rowDefIndex = rowOrder.get(rowDef);
  6. RowDef rowDefToSwap = null;
  7. for (Map.Entry<RowDef, Integer> entry : rowOrder.entrySet()) {
  8. if (entry.getValue().intValue() == rowDefIndex + 1) {
  9. rowDefToSwap = entry.getKey();
  10. break;
  11. }
  12. }
  13. if (rowDefToSwap != null) {
  14. rowsTable.unselect(rowDef);
  15. rowOrder.remove(rowDef);
  16. rowOrder.remove(rowDefToSwap);
  17. rowOrder.put(rowDef, rowDefIndex + 1);
  18. rowOrder.put(rowDefToSwap, rowDefIndex);
  19. rows.sort(new Object[]{"label"}, new boolean[]{true});
  20. rowsTable.refreshRowCache();
  21. rowsTable.select(rowDef);
  22. }
  23. }
  24. }
  25. });

代码示例来源:origin: OpenNMS/opennms

  1. @Override
  2. public void buttonClick(Button.ClickEvent clickEvent) {
  3. ColumnDef columnDef = (ColumnDef) columnsTable.getValue();
  4. if (columnDef != null) {
  5. int columnDefIndex = columnOrder.get(columnDef);
  6. ColumnDef columnDefToSwap = null;
  7. for (Map.Entry<ColumnDef, Integer> entry : columnOrder.entrySet()) {
  8. if (entry.getValue().intValue() == columnDefIndex + 1) {
  9. columnDefToSwap = entry.getKey();
  10. break;
  11. }
  12. }
  13. if (columnDefToSwap != null) {
  14. columnsTable.unselect(columnDef);
  15. columnOrder.remove(columnDef);
  16. columnOrder.remove(columnDefToSwap);
  17. columnOrder.put(columnDef, columnDefIndex + 1);
  18. columnOrder.put(columnDefToSwap, columnDefIndex);
  19. columns.sort(new Object[]{"label"}, new boolean[]{true});
  20. columnsTable.refreshRowCache();
  21. columnsTable.select(columnDef);
  22. }
  23. }
  24. }
  25. });

代码示例来源:origin: OpenNMS/opennms

  1. @Override
  2. public void buttonClick(Button.ClickEvent clickEvent) {
  3. ColumnDef columnDef = (ColumnDef) columnsTable.getValue();
  4. if (columnDef != null) {
  5. int columnDefIndex = columnOrder.get(columnDef);
  6. ColumnDef columnDefToSwap = null;
  7. for (Map.Entry<ColumnDef, Integer> entry : columnOrder.entrySet()) {
  8. if (entry.getValue().intValue() == columnDefIndex - 1) {
  9. columnDefToSwap = entry.getKey();
  10. break;
  11. }
  12. }
  13. if (columnDefToSwap != null) {
  14. columnsTable.unselect(columnDef);
  15. columnOrder.remove(columnDef);
  16. columnOrder.remove(columnDefToSwap);
  17. columnOrder.put(columnDef, columnDefIndex - 1);
  18. columnOrder.put(columnDefToSwap, columnDefIndex);
  19. columns.sort(new Object[]{"label"}, new boolean[]{true});
  20. columnsTable.refreshRowCache();
  21. columnsTable.select(columnDef);
  22. }
  23. }
  24. }
  25. });

代码示例来源:origin: OpenNMS/opennms

  1. /**
  2. * Adds the handler.
  3. */
  4. private void addHandler() {
  5. org.opennms.netmgt.config.datacollection.Parameter p = new org.opennms.netmgt.config.datacollection.Parameter();
  6. p.setKey("New Parameter");
  7. p.setValue("New Value");
  8. table.select(container.addOnmsBean(p));
  9. }

代码示例来源:origin: OpenNMS/opennms

  1. /**
  2. * Adds the handler.
  3. */
  4. private void addHandler() {
  5. MibObj obj = new MibObj();
  6. obj.setOid(".1.1.1.1");
  7. obj.setInstance("0");
  8. obj.setType("gauge");
  9. obj.setAlias("test");
  10. table.select(container.addOnmsBean(obj));
  11. }

代码示例来源:origin: OpenNMS/opennms

  1. categoriesMap.put(onmsCategory.getId(), onmsCategory);
  2. if (def.containsCategory(onmsCategory.getName())) {
  3. categoriesTable.select(onmsCategory.getId());

相关文章

Table类方法