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

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

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

Grid.withPropertySet介绍

[英]Creates a grid using a custom PropertySet implementation for creating a default set of columns and for resolving property names with #addColumn(String) and Column#setEditorComponent(HasValue).

This functionality is provided as static method instead of as a public constructor in order to make it possible to use a custom property set without creating a subclass while still leaving the public constructors focused on the common use cases.
[中]使用自定义PropertySet实现创建网格,以创建默认列集,并使用#addColumn(String)和列#setEditorComponent(HasValue)解析属性名称。
此功能作为静态方法而不是公共构造函数提供,以便在不创建子类的情况下使用自定义属性集,同时使公共构造函数仍专注于常见用例。

代码示例

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

/**
 * Cosntructor.
 * @param beanType Bean class (not null)
 */
public DefaultBeanListing(Class<T> beanType) {
  super();
  propertySet = new BeanGridPropertySet<>(beanType);
  setDefaultVisibleProperties(() -> getDefaultColumnIds());
  initGrid(Grid.withPropertySet(propertySet), propertySet);
}

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

/**
 * Constructor.
 * @param <P> Property type
 * @param properties Listing property set (not null)
 */
public <P extends Property<?>> DefaultPropertyListing(Iterable<P> properties) {
  super();
  ObjectUtils.argumentNotNull(properties, "Listing property set must be not null");
  propertySet = new GridPropertySet(properties);
  setDefaultVisibleProperties(() -> getDefaultColumnIds());
  initGrid(Grid.withPropertySet(propertySet), propertySet);
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework

bindInstance(ListPresenter.class, listPresenter);
grid = Grid.withPropertySet(listPresenter.getPropertySet());
grid.setSizeFull();
grid.setSelectionMode(definition.isMultiSelect() ? Grid.SelectionMode.MULTI : Grid.SelectionMode.SINGLE);

相关文章

微信公众号

最新文章

更多

Grid类方法