Package org.thechiselgroup.choosel.core.client.views.resolvers

Examples of org.thechiselgroup.choosel.core.client.views.resolvers.CalculationResolver


            return calculation.getDescription();
        }

        @Override
        public ViewItemValueResolver getResolver() {
            return new CalculationResolver(propertySelector.getSelectedValue(),
                    calculation);
        }
View Full Code Here


                            .getValue(MEMENTO_KEY_PROPERTY);
                    String calculationType = (String) child
                            .getValue(MEMENTO_KEY_CALCULATION_TYPE);

                    if ("min".equals(calculationType)) {
                        setResolver(slot, new CalculationResolver(property,
                                Subset.ALL, new MinCalculation()));
                    } else if ("max".equals(calculationType)) {
                        setResolver(slot, new CalculationResolver(property,
                                Subset.ALL, new MaxCalculation()));
                    } else if ("sum".equals(calculationType)) {
                        setResolver(slot, new CalculationResolver(property,
                                Subset.ALL, new SumCalculation()));
                    } else if ("average".equals(calculationType)) {
                        setResolver(slot, new CalculationResolver(property,
                                Subset.ALL, new AverageCalculation()));
                    }
                }
            } else {
                setResolver(slot,
View Full Code Here

        switch (dataType) {
        case TEXT:
            return new TextPropertyResolver(firstProperty);
        case NUMBER:
            return new CalculationResolver(firstProperty, new SumCalculation());
        }

        return new FirstResourcePropertyResolver(firstProperty, dataType);
    }
View Full Code Here

TOP

Related Classes of org.thechiselgroup.choosel.core.client.views.resolvers.CalculationResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.