use of de.symeda.sormas.ui.utils.BooleanRenderer in project SORMAS-Project by hzi-braunschweig.
the class ShareRequestGrid method initGridColumns.
private void initGridColumns() {
addShowColumn((request) -> {
ControllerProvider.getSormasToSormasController().showRequestDetails(request);
});
addComponentColumn(indexDto -> createActionButtons(indexDto)).setId(COLUMN_ACTIONS);
setColumns(SHOW_MESSAGE, SormasToSormasShareRequestIndexDto.UUID, SormasToSormasShareRequestIndexDto.CREATION_DATE, SormasToSormasShareRequestIndexDto.DATA_TYPE, SormasToSormasShareRequestIndexDto.ORGANIZATION_NAME, SormasToSormasShareRequestIndexDto.SENDER_NAME, SormasToSormasShareRequestIndexDto.OWNERSHIP_HANDED_OVER, SormasToSormasShareRequestIndexDto.STATUS, SormasToSormasShareRequestIndexDto.COMMENT, COLUMN_ACTIONS);
getColumn(COLUMN_ACTIONS).setMinimumWidth(260);
((Column<SormasToSormasShareRequestIndexDto, String>) getColumn(LabMessageIndexDto.UUID)).setRenderer(new UuidRenderer());
((Column<SormasToSormasShareRequestIndexDto, Date>) getColumn(SormasToSormasShareRequestIndexDto.CREATION_DATE)).setRenderer(new DateRenderer(DateHelper.getLocalDateTimeFormat(I18nProperties.getUserLanguage())));
getColumn(SormasToSormasShareRequestIndexDto.ORGANIZATION_NAME).setSortable(false);
getColumn(SormasToSormasShareRequestIndexDto.OWNERSHIP_HANDED_OVER).setRenderer(new BooleanRenderer());
for (Column<?, ?> column : getColumns()) {
column.setCaption(I18nProperties.getPrefixCaption(SormasToSormasShareRequestIndexDto.I18N_PREFIX, column.getId(), column.getCaption()));
}
setSortOrder(Collections.singletonList(new GridSortOrder<>(getColumn(SormasToSormasShareRequestIndexDto.CREATION_DATE), SortDirection.DESCENDING)));
}
use of de.symeda.sormas.ui.utils.BooleanRenderer in project SORMAS-Project by hzi-braunschweig.
the class TravelEntryGrid method initColumns.
private void initColumns() {
setColumns(TravelEntryIndexDto.UUID, TravelEntryIndexDto.EXTERNAL_ID, TravelEntryIndexDto.PERSON_FIRST_NAME, TravelEntryIndexDto.PERSON_LAST_NAME, TravelEntryIndexDto.HOME_DISTRICT_NAME, TravelEntryIndexDto.POINT_OF_ENTRY_NAME, TravelEntryIndexDto.RECOVERED, TravelEntryIndexDto.VACCINATED, TravelEntryIndexDto.TESTED_NEGATIVE, TravelEntryIndexDto.QUARANTINE_TO);
((Column<TravelEntryIndexDto, String>) getColumn(TravelEntryIndexDto.UUID)).setRenderer(new UuidRenderer());
((Column<TravelEntryIndexDto, Boolean>) getColumn(TravelEntryIndexDto.RECOVERED)).setRenderer(new BooleanRenderer());
((Column<TravelEntryIndexDto, Boolean>) getColumn(TravelEntryIndexDto.VACCINATED)).setRenderer(new BooleanRenderer());
((Column<TravelEntryIndexDto, Boolean>) getColumn(TravelEntryIndexDto.TESTED_NEGATIVE)).setRenderer(new BooleanRenderer());
((Column<TravelEntryIndexDto, Date>) getColumn(TravelEntryIndexDto.QUARANTINE_TO)).setRenderer(new DateRenderer(DateFormatHelper.getDateFormat()));
for (Column<TravelEntryIndexDto, ?> column : getColumns()) {
column.setCaption(I18nProperties.findPrefixCaptionWithDefault(column.getId(), column.getCaption(), TravelEntryIndexDto.I18N_PREFIX, PersonDto.I18N_PREFIX));
column.setStyleGenerator(FieldAccessColumnStyleGenerator.getDefault(getBeanType(), column.getId()));
}
}
Aggregations