2017-03-22 1 views
2

this demo Sampler of the Grid widget에는 소스 코드 탭에 ComponentRenderer이라는 클래스를 호출하는 코드가 표시됩니다.Vaadin Sampler의 'ComponentRenderer'클래스는 무엇입니까?

Map<CountryData, Double> countryRatings = new HashMap<>(); 
Grid<CountryData> countryGrid = new Grid<CountryData>(
     "Rate your favorite Countries"); 
countryGrid.setItems(countries); 

countryGrid.addColumn(country -> new Label(country.getFullName()), 
     new ComponentRenderer()).setCaption("Name"); 
countryGrid.addColumn(country -> { 
    RatingStars ratingStars = new RatingStars(); 
    ratingStars.setMaxValue(5); 
    ratingStars.setValue(countryRatings.containsKey(country) 
      ? countryRatings.get(country) : 0.0d); 
    ratingStars.addValueChangeListener(
      event -> countryRatings.put(country, event.getValue())); 
    return ratingStars; 
}, new ComponentRenderer()).setCaption("Rating"); 

이 클래스는 Vaadin 8.0.3 API JavaDoc에 나열되어 있습니다. 그렇다면이 데모 코드에서 어떤 클래스가 사용되고 있습니까?

+2

https://github.com/datenhahn/componentrenderer/ –

답변

1

Vaadin 8.1에서 곧 출시 될 기능입니다. 현재 알파 출시를 확인한 경우 사용할 수 있습니다. https://vaadin.com/releases

+0

업데이트 : 'ComponentRenderer'를 포함하여 Vaadin 8.1이 출시되었습니다. –

관련 문제