use of com.vaadin.flow.component.grid.ColumnTextAlign.END in project furms by unity-idm.
the class SitesView method addTable.
private void addTable() {
FlexLayout tableLayout = new FlexLayout();
tableLayout.setWidthFull();
List<SiteGridItem> sites = fetchSites();
DenseGrid<SiteGridItem> siteGrid = new DenseGrid<>(SiteGridItem.class);
siteGrid.setItems(sites);
Binder<SiteGridItem> siteBinder = new Binder<>(SiteGridItem.class);
Editor<SiteGridItem> siteEditor = siteGrid.getEditor();
siteEditor.setBinder(siteBinder);
siteEditor.setBuffered(true);
siteEditor.addOpenListener(event -> onEditorOpen(event, siteBinder));
siteEditor.addCloseListener(event -> onEditorClose(siteBinder));
siteGrid.addComponentColumn(site -> new RouterLink(site.getName(), SitesAdminsView.class, site.getId())).setHeader(getTranslation("view.sites.main.grid.column.name")).setKey("name").setSortable(true).setComparator(SiteGridItem::getName).setEditorComponent(addEditForm(siteEditor));
siteGrid.addComponentColumn(site -> createLastColumnContent(site, siteGrid)).setHeader(getTranslation("view.sites.main.grid.column.actions")).setKey("actions").setEditorComponent(addEditButtons(siteEditor)).setTextAlign(END);
tableLayout.add(siteGrid);
getContent().add(tableLayout);
}
Aggregations