Package org.eclipse.nebula.widgets.nattable.layer

Examples of org.eclipse.nebula.widgets.nattable.layer.DataLayer


public class ElementalLayerPerformanceTest extends AbstractLayerPerformanceTest {

    @Test
    public void testNormalDataLayerPerformance() {
        layer = new DataLayer(new DummyBodyDataProvider(10, 50));
    }
View Full Code Here


        layer = new DataLayer(new DummyBodyDataProvider(10, 50));
    }

    @Test
    public void testBigDataLayerPerformance() {
        layer = new DataLayer(new DummyBodyDataProvider(50, 100));
        setExpectedTimeInMillis(250);
    }
View Full Code Here

        setExpectedTimeInMillis(250);
    }

    @Test
    public void testReorderDataLayerPerformance() {
        layer = new ColumnReorderLayer(new DataLayer(new DummyBodyDataProvider(
                10, 50)));
    }
View Full Code Here

            for (int j = 0; j < 10; j++) {
                testData[i][j] = "" + i + "/" + j;
            }
        }

        final DataLayer bodyDataLayer = new DataLayer(
                new TwoDimensionalArrayDataProvider(testData));
        bodyDataLayer.setDefaultColumnWidth(30);

        // use different style bits to avoid rendering of inactive scrollbars
        // for small table
        // Note: The enabling/disabling and showing of the scrollbars is handled
        // by the ViewportLayer.
View Full Code Here

                10, 50)));
    }

    @Test
    public void testHideShowDataLayerPerformance() {
        layer = new ColumnHideShowLayer(new DataLayer(
                new DummyBodyDataProvider(10, 50)));
    }
View Full Code Here

                new DummyBodyDataProvider(10, 50)));
    }

    @Test
    public void testSelectionDataLayerPerformance() {
        layer = new SelectionLayer(new DataLayer(new DummyBodyDataProvider(10,
                50)));
    }
View Full Code Here

    }

    @Test
    public void testCompositeDataLayerPerformance() {
        CompositeLayer compositeLayer = new CompositeLayer(1, 1);
        compositeLayer.setChildLayer(GridRegion.BODY, new DataLayer(
                new DummyBodyDataProvider(10, 50)), 0, 0);

        layer = compositeLayer;
    }
View Full Code Here

        DefaultGridLayer gridLayer = new DefaultGridLayer(bodyDataProvider,
                new DefaultColumnHeaderDataProvider(propertyNames,
                        propertyToLabelMap));

        final DataLayer bodyDataLayer = (DataLayer) gridLayer
                .getBodyDataLayer();

        final ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyDataLayer);
        bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator);
        registerColumnLabels(columnLabelAccumulator);

        natTable = new NatTable(parent, gridLayer, false);
        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        natTable.addConfiguration(new PainterConfiguration());
View Full Code Here

        IColumnPropertyAccessor<T> columnPropertyAccessor = new ReflectiveColumnPropertyAccessor<T>(
                propertyNames);
        bodyDataProvider = new ListDataProvider<T>(sortedList,
                columnPropertyAccessor);

        bodyDataLayer = new DataLayer(bodyDataProvider);
        glazedListsEventLayer = new GlazedListsEventLayer<T>(bodyDataLayer,
                eventList);
        bodyLayerStack = new DefaultBodyLayerStack(glazedListsEventLayer);

        // Sort Column header
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
        columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
                columnHeaderDataProvider);
        ColumnHeaderLayer columnHeaderLayer = new ColumnHeaderLayer(
                columnHeaderDataLayer, bodyLayerStack,
                bodyLayerStack.getSelectionLayer());

        // Auto configure off. Configurations have to applied manually.
        SortHeaderLayer<T> columnHeaderSortableLayer = new SortHeaderLayer<T>(
                columnHeaderLayer, new GlazedListsSortModel<T>(sortedList,
                        columnPropertyAccessor, configRegistry,
                        columnHeaderDataLayer), false);

        // Row header
        DefaultRowHeaderDataProvider rowHeaderDataProvider = new DefaultRowHeaderDataProvider(
                bodyDataProvider);
        DefaultRowHeaderDataLayer rowHeaderDataLayer = new DefaultRowHeaderDataLayer(
                rowHeaderDataProvider);
        RowHeaderLayer rowHeaderLayer = new RowHeaderLayer(rowHeaderDataLayer,
                bodyLayerStack, bodyLayerStack.getSelectionLayer());

        // Corner
        DefaultCornerDataProvider cornerDataProvider = new DefaultCornerDataProvider(
                columnHeaderDataProvider, rowHeaderDataProvider);
        DataLayer cornerDataLayer = new DataLayer(cornerDataProvider);
        CornerLayer cornerLayer = new CornerLayer(cornerDataLayer,
                rowHeaderLayer, columnHeaderLayer);

        // Grid
        setBodyLayer(bodyLayerStack);
View Full Code Here

            IConfigRegistry configRegistry) {

        bodyDataProvider = new ListDataProvider<T>(eventList,
                columnPropertyAccessor);

        bodyDataLayer = new DataLayer(bodyDataProvider);

        glazedListsEventLayer = new GlazedListsEventLayer<T>(bodyDataLayer,
                eventList);
        glazedListsEventLayer.setTestMode(true);
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.layer.DataLayer

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.