Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.ocs.dynamo.ui.composite.grid;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
import java.util.function.BiFunction;
import java.util.function.Function;
import org.apache.commons.lang3.StringUtils;
import com.ocs.dynamo.domain.AbstractEntity;
import com.ocs.dynamo.service.MessageService;
import com.ocs.dynamo.service.ServiceLocatorFactory;
import com.ocs.dynamo.ui.provider.PivotAggregationType;
import com.ocs.dynamo.ui.provider.PivotDataProvider;
import com.ocs.dynamo.ui.provider.PivotedItem;
import com.ocs.dynamo.ui.utils.VaadinUtils;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.grid.GridVariant;
import com.vaadin.flow.component.grid.HeaderRow;
/**
*
* @author Bas Rutten
*
* A grid that is used to display a collection of pivoted data. Pivoted
* data is data that is aggregated so that multiple rows from the flat
* data set are transformed into a single row.
*
* This pivot grid assumes that there are a number of possible values
* for a certain field (the field to pivot on) and each possible value
* leads to a column in the pivot table.
*
* @param the type of the private key
* @param the type of the entity
*/
public class PivotGrid> extends Grid {
private static final long serialVersionUID = -1302975905471267532L;
private MessageService messageService = ServiceLocatorFactory.getServiceLocator().getMessageService();
/**
* Constructor
*
* @param provider the data provider
* @param possibleColumnKeys the possible column kyes
* @param fixedHeaderMapper the fixed header mapper
* @param headerMapper the header mapper
* @param subHeaderMapper the sub header mapper
* @param customFormatter custom formatter
*/
public PivotGrid(PivotDataProvider provider, List