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

x33g5p2x  于2022-01-20 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(166)

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

Grid.setItems介绍

暂无

代码示例

代码示例来源:origin: com.vaadin/vaadin-server

setItems(items);
selectedItems.forEach(getSelectionModel()::select);

代码示例来源:origin: jpos/jPOS-EE

public void setItems(Collection<GLEntry> entries) {
  super.setItems(entries);
}

代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor

private void refreshInfoGrid() {
  this.infoGrid.setItems(Collections.singletonList(this.ehcache));
}

代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor

private void refreshDetailGrid() {
  this.detailGrid.setItems(this.ehcache.getAll(getKeys(this.ehcache, SEARCH_DEFAULT)).values());
}

代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor

private void searchAction() {
  String value = this.searchTextField.getValue();
  if (StringUtils.isEmpty(value)) {
    value = "";
  }
  this.detailGrid.setItems(ehcache.getAll(getKeys(ehcache, value)).values());
}

代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor

private Grid<Cache> createCacheGrid(CacheManager cacheManager) {
    Grid<Cache> grid = new Grid<>();
    grid.addColumn(Cache::getName).setCaption("Name");
    grid.addColumn(cache -> ((Double) (((double) cache.getStatistics().cacheHitCount()) / ((double) (cache.getStatistics().cacheMissCount() + cache.getStatistics().cacheHitCount())) * 100)).intValue() + "%").setCaption("Hit Ratio");
    grid.addColumn(cache -> cache.getCacheConfiguration().getMaxEntriesLocalHeap()).setCaption("Max Size");
    grid.addColumn(Cache::getSize).setCaption("Size");
    grid.addColumn(Cache::getStatus).setCaption("Status");
    grid.addColumn(cache -> cache.getCacheConfiguration().getTimeToIdleSeconds()).setCaption("TTldle(s)");
    grid.addColumn(cache -> cache.getCacheConfiguration().getTimeToLiveSeconds()).setCaption("TTLive(s)");
    grid.addColumn(cache -> cache.getStatistics().cacheHitCount()).setCaption("hit");
    grid.addColumn(cache -> cache.getStatistics().cacheMissExpiredCount()).setCaption("miss : Expire");
    grid.addColumn(cache -> cache.getStatistics().cacheMissNotFoundCount()).setCaption("miss : Not Found");

    grid.setItems(Arrays.stream(cacheManager.getCacheNames())
        .map(cacheManager::getCache)
        .collect(Collectors.toList()));
    grid.setSizeFull();
    grid.setSelectionMode(Grid.SelectionMode.NONE);

    int cacheSize = cacheManager.getCacheNames().length;
    if (cacheSize != 0) {
      grid.setHeightByRows(cacheSize > 10 ? 10 : cacheSize);
    }
    return grid;
  }
}

代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor

private Grid<Cache> createCacheInfoGrid() {
  Grid<Cache> grid = new Grid<>();
  grid.addColumn(Cache::getName).setCaption("Name");
  grid.addColumn(cache -> ((Double) (((double) cache.getStatistics().cacheHitCount()) / ((double) (cache.getStatistics().cacheMissCount() + cache.getStatistics().cacheHitCount())) * 100)).intValue() + "%").setCaption("Hit Ratio");
  grid.addColumn(cache -> cache.getCacheConfiguration().getMaxEntriesLocalHeap()).setCaption("Max Size");
  grid.addColumn(Cache::getSize).setCaption("Size");
  grid.addColumn(Cache::getStatus).setCaption("Status");
  grid.addColumn(cache -> cache.getCacheConfiguration().getTimeToIdleSeconds()).setCaption("TTldle(s)");
  grid.addColumn(cache -> cache.getCacheConfiguration().getTimeToLiveSeconds()).setCaption("TTLive(s)");
  grid.addColumn(cache -> cache.getStatistics().cacheHitCount()).setCaption("hit");
  grid.addColumn(cache -> cache.getStatistics().cacheMissExpiredCount()).setCaption("miss : Expire");
  grid.addColumn(cache -> cache.getStatistics().cacheMissNotFoundCount()).setCaption("miss : Not Found");
  grid.setItems(Collections.singletonList(this.ehcache));
  grid.setWidth("100%");
  grid.setSelectionMode(Grid.SelectionMode.NONE);
  grid.setHeightByRows(1);
  return grid;
}

代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor

return button;
}, new ComponentRenderer()).setCaption("");
grid.setItems(this.ehcache.getAll(getKeys(this.ehcache, SEARCH_DEFAULT)).values());
grid.setWidth("100%");
grid.setSelectionMode(Grid.SelectionMode.NONE);

相关文章

Grid类方法