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

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


                new VisualItemStatusResolver(COLOR_DEFAULT_BORDER, StatusRule
                        .full(COLOR_SELECTION_BORDER, Subset.SELECTED),
                        StatusRule.fullOrPartial(COLOR_HIGHLIGHTED_BORDER,
                                Subset.HIGHLIGHTED)));
        scatterPlot.setResolver(ScatterPlot.X_POSITION,
                new CalculationResolver(BenchmarkResourceSetFactory.NUMBER_2,
                        new SumCalculation()));
        scatterPlot.setResolver(ScatterPlot.Y_POSITION,
                new CalculationResolver(BenchmarkResourceSetFactory.NUMBER_1,
                        new SumCalculation()));
        scatterPlot.setResolver(ScatterPlot.SIZE, new FixedValueResolver(20,
                DataType.NUMBER));
        scatterPlot.setResolver(ScatterPlot.SHAPE,
                new AbstractBasicVisualItemValueResolver() {
View Full Code Here


                PieChart.BORDER_COLOR,
                new VisualItemStatusResolver(COLOR_DEFAULT_BORDER, StatusRule
                        .full(COLOR_SELECTION_BORDER, Subset.SELECTED),
                        StatusRule.fullOrPartial(COLOR_HIGHLIGHTED_BORDER,
                                Subset.HIGHLIGHTED)));
        pieChart.setResolver(PieChart.VALUE, new CalculationResolver(
                BenchmarkResourceSetFactory.NUMBER_2, new SumCalculation()));
        pieChart.setResolver(PieChart.PARTIAL_VALUE,
                new SubsetDelegatingValueResolver(PieChart.VALUE,
                        Subset.SELECTED));
        pieChart.setResolver(PieChart.PARTIAL_COLOR, COLOR_RESOLVER);
View Full Code Here

                new VisualItemDoubleComparator(BarChart.BAR_LENGTH));
        // mappings
        barChart.setResolver(BarChart.BAR_LABEL,
                new FirstResourcePropertyResolver(
                        BenchmarkResourceSetFactory.TEXT_2, DataType.TEXT));
        barChart.setResolver(BarChart.BAR_LENGTH, new CalculationResolver(
                BenchmarkResourceSetFactory.NUMBER_2, new SumCalculation()) {
            @Override
            public String toString() {
                return "my axis label"; // example for axis labeling
            }
View Full Code Here

     */
    @Test
    public void visualItemsReturnCorrectValuesOnViewContentDisplayUpdateAfterResourceSetChange() {
        String propertyName = "property";

        underTest.setResolver(slot, new CalculationResolver(propertyName,
                new SumCalculation()));

        Resource resource1 = createResource(TYPE_1, 1);
        resource1.putValue(propertyName, 1d);
        helper.addToContainedResources(resource1);
View Full Code Here

                .getValue(textSlot));
    }

    @Test
    public void changingSlotMappingUpdatesVisualItemValue2() {
        underTest.setResolver(numberSlot, new CalculationResolver(
                NUMBER_PROPERTY_1, new SumCalculation()));
        getFirstVisualItem().getValue(numberSlot);
        underTest.setResolver(numberSlot, new CalculationResolver(
                NUMBER_PROPERTY_1, new MaxCalculation()));

        assertEquals(8d, getFirstVisualItem().getValue(numberSlot));
    }
View Full Code Here

    }

    private void testCalculationOverGroup(double expectedResult,
            Calculation calculation) {

        underTest.setResolver(numberSlot, new CalculationResolver(
                NUMBER_PROPERTY_1, calculation));

        List<VisualItem> resourceItems = underTest.getFullVisualItemContainer().getVisualItems().toList();
        assertEquals(1, resourceItems.size());
        VisualItem resourceItem = resourceItems.get(0);
View Full Code Here

        this.calculation = calculation;
    }

    @Override
    protected CalculationResolver createUnmanagedResolver(String property) {
        return new CalculationResolver(property, calculation);
    }
View Full Code Here

TOP

Related Classes of org.thechiselgroup.choosel.core.client.visualization.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.