Package org.eclipse.nebula.widgets.nattable.util

Examples of org.eclipse.nebula.widgets.nattable.util.ICalculator


                children = getElementsInGroup(groupByObject);
                final List<T> c = children;
                return this.valueCache.getCalculatedValue(columnPosition,
                        rowPosition, new GroupByValueCacheKey(columnPosition,
                                rowPosition, groupByObject), true,
                        new ICalculator() {
                            @Override
                            public Object executeCalculation() {
                                return summaryProvider.summarize(
                                        columnPosition, c);
                            }
View Full Code Here


                            final List<T> children = getElementsInGroup(groupByObject);
                            final int col = j;
                            this.valueCache.getCalculatedValue(j, i,
                                    new GroupByValueCacheKey(j, i,
                                            groupByObject), false,
                                    new ICalculator() {
                                        @Override
                                        public Object executeCalculation() {
                                            return summaryProvider.summarize(
                                                    col, children);
                                        }
View Full Code Here

        @Override
        public Object getDataValue(final int colIndex, final int rowIndex) {
            if (colIndex == 3) {
                Object result = this.valueCache.getCalculatedValue(colIndex,
                        rowIndex, true, new ICalculator() {
                            @Override
                            public Object executeCalculation() {
                                // calculate the sum
                                int colTwo = (Integer) getDataValue(1, rowIndex);
                                int colThree = (Integer) getDataValue(2,
                                        rowIndex);
                                // add some delay
                                try {
                                    Thread.sleep(500);
                                } catch (InterruptedException e) {}
                                return colTwo + colThree;
                            }
                        });

                return result == null ? 0 : result;
            } else if (colIndex == 4) {
                Object result = this.valueCache.getCalculatedValue(colIndex,
                        rowIndex, true, new ICalculator() {
                            @Override
                            public Object executeCalculation() {
                                // calculate the percentage
                                int colOne = (Integer) getDataValue(0, rowIndex);
                                int colTwo = (Integer) getDataValue(1, rowIndex);
View Full Code Here

        // rows are added or
        // removed because the value cache takes into account column and row
        // position for caching.
        return this.valueCache.getCalculatedValue(columnPosition,
                getSummaryRowPosition(), calculateInBackground,
                new ICalculator() {

                    @Override
                    public Object executeCalculation() {
                        LabelStack labelStack = getConfigLabelsByPositionWithoutTransformation(
                                columnPosition, getSummaryRowPosition());
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.util.ICalculator

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.