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

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

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

Table.unselect介绍

暂无

代码示例

代码示例来源:origin: org.opennms.features/vaadin-surveillance-views

  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: org.opennms.features/vaadin-surveillance-views

  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: org.opennms.features/vaadin-surveillance-views

  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: org.opennms.features/vaadin-surveillance-views

  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: org.opennms.features/vaadin-surveillance-views

  1. @Override
  2. public void buttonClick(Button.ClickEvent clickEvent) {
  3. ColumnDef columnDef = (ColumnDef) columnsTable.getValue();
  4. if (columnDef != null) {
  5. columnsTable.unselect(columnDef);
  6. columns.removeItem(columnDef);
  7. }
  8. columnsTable.refreshRowCache();
  9. }
  10. });

代码示例来源:origin: org.opennms.features/vaadin-surveillance-views

  1. @Override
  2. public void buttonClick(Button.ClickEvent clickEvent) {
  3. RowDef rowDef = (RowDef) rowsTable.getValue();
  4. if (rowDef != null) {
  5. rowsTable.unselect(rowDef);
  6. rows.removeItem(rowDef);
  7. }
  8. rowsTable.refreshRowCache();
  9. }
  10. });

代码示例来源:origin: org.apache.ace/org.apache.ace.webui.vaadin

  1. if (!m_activeTable.equals(m_table)) {
  2. for (Object val : m_activeSelection) {
  3. m_activeTable.unselect(val);

代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin

  1. @Override
  2. public void deselect(T item) {
  3. ObjectUtils.argumentNotNull(item, "Item must be not null");
  4. switch (getRenderingMode()) {
  5. case GRID:
  6. getGrid().deselect(requireDataSource().getId(item));
  7. break;
  8. case TABLE:
  9. getTable().unselect(requireDataSource().getId(item));
  10. break;
  11. default:
  12. break;
  13. }
  14. }

代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin

  1. @Override
  2. public boolean removeItem(T item) {
  3. ObjectUtils.argumentNotNull(item, "Item must be not null");
  4. final Object id = requireDataSource().getId(item);
  5. boolean removed = requireDataSource().remove(item);
  6. // check commit on remove
  7. if (isCommitOnRemove()) {
  8. commit();
  9. }
  10. if (removed && id != null && getSelectionMode() != Selectable.SelectionMode.NONE) {
  11. switch (getRenderingMode()) {
  12. case GRID:
  13. getGrid().deselect(id);
  14. break;
  15. case TABLE:
  16. getTable().unselect(id);
  17. break;
  18. default:
  19. break;
  20. }
  21. }
  22. return removed;
  23. }

相关文章