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

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

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

Grid.setDetailsGenerator介绍

[英]Sets the details component generator.
[中]设置详细信息零部件生成器。

代码示例

代码示例来源:origin: com.haulmont.cuba/cuba-web

@Override
public void setDetailsGenerator(DetailsGenerator<E> detailsGenerator) {
  this.detailsGenerator = detailsGenerator;
  component.setDetailsGenerator(detailsGenerator != null ? this::getRowDetails : null);
}

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

/**
 * Set the item details component generator.
 * @param itemDetailsGenerator the item details component generator to set (not null)
 */
public void setDetailsGenerator(ItemDetailsGenerator<T> itemDetailsGenerator) {
  ObjectUtils.argumentNotNull(itemDetailsGenerator, "Generator must be not null");
  getGrid().setDetailsGenerator(item -> itemDetailsGenerator.getItemDetails(item));
}

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

/**
 * Set the grid row details generator
 * @param detailsGenerator Generator to set (not null)
 */
public void setDetailsGenerator(final ItemDetailsGenerator<T> detailsGenerator) {
  ObjectUtils.argumentNotNull(detailsGenerator, "Generator must be not null");
  getGrid().setDetailsGenerator(
      row -> getItem(row.getItemId()).map(i -> detailsGenerator.getItemDetails(i)).orElse(null));
}

相关文章

Grid类方法