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

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

本文整理了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

  1. /**
  2. * Cosntructor.
  3. * @param beanType Bean class (not null)
  4. */
  5. public DefaultBeanListing(Class<T> beanType) {
  6. super();
  7. propertySet = new BeanGridPropertySet<>(beanType);
  8. setDefaultVisibleProperties(() -> getDefaultColumnIds());
  9. initGrid(Grid.withPropertySet(propertySet), propertySet);
  10. }

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

  1. /**
  2. * Constructor.
  3. * @param <P> Property type
  4. * @param properties Listing property set (not null)
  5. */
  6. public <P extends Property<?>> DefaultPropertyListing(Iterable<P> properties) {
  7. super();
  8. ObjectUtils.argumentNotNull(properties, "Listing property set must be not null");
  9. propertySet = new GridPropertySet(properties);
  10. setDefaultVisibleProperties(() -> getDefaultColumnIds());
  11. initGrid(Grid.withPropertySet(propertySet), propertySet);
  12. }

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

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

相关文章

Grid类方法