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

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


                50)));
    }

    @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


            // if the layer is a CompositeLayer, search for the SelectionLayer
            // in every region
            // as the SelectionLayer is typically placed in the bottom/right
            // most region (e.g. the body
            // in a grid, the search is performed backwards
            CompositeLayer composite = (CompositeLayer) layer;
            for (int x = composite.getLayoutXCount(); x >= 0; x--) {
                for (int y = composite.getLayoutYCount(); y >= 0; y--) {
                    ILayer childStack = composite
                            .getChildLayerByLayoutCoordinate(x, y);
                    ILayer result = findSelectionLayer(childStack);
                    if (result instanceof SelectionLayer) {
                        return result;
                    }
View Full Code Here

        // build the grid layer
        GridLayer gridLayer = new GridLayer(bodyLayerStack, columnHeaderLayer,
                rowHeaderLayer, cornerLayer);

        // set the group by header on top of the grid
        CompositeLayer compositeGridLayer = new CompositeLayer(1, 2);
        final GroupByHeaderLayer groupByHeaderLayer = new GroupByHeaderLayer(
                bodyLayerStack.getGroupByModel(), gridLayer,
                columnHeaderDataProvider);
        compositeGridLayer.setChildLayer(GroupByHeaderLayer.GROUP_BY_REGION,
                groupByHeaderLayer, 0, 0);
        compositeGridLayer.setChildLayer("Grid", gridLayer, 0, 1);

        // turn the auto configuration off as we want to add our header menu
        // configuration
        NatTable natTable = new NatTable(parent, compositeGridLayer, false);
View Full Code Here

                new DefaultRowHeaderDataLayer(new DefaultRowHeaderDataProvider(
                        bodyDataProvider)), viewportLayer, selectionLayer);

        // set the region labels to make default configurations work, e.g.
        // selection
        CompositeLayer compositeLayer = new CompositeLayer(2, 1);
        compositeLayer.setChildLayer(GridRegion.ROW_HEADER, rowHeaderLayer, 0,
                0);
        compositeLayer.setChildLayer(GridRegion.BODY, viewportLayer, 1, 0);

        return new NatTable(parent, compositeLayer);
    }
View Full Code Here

                new DefaultColumnHeaderDataProvider(propertyNames,
                        propertyToLabelMap)), viewportLayer, selectionLayer);

        // set the region labels to make default configurations work, e.g.
        // selection
        CompositeLayer compositeLayer = new CompositeLayer(1, 2);
        compositeLayer.setChildLayer(GridRegion.COLUMN_HEADER,
                columnHeaderLayer, 0, 0);
        compositeLayer.setChildLayer(GridRegion.BODY, viewportLayer, 0, 1);

        return new NatTable(parent, compositeLayer);
    }
View Full Code Here

        // build the grid layer
        GridLayer gridLayer = new GridLayer(bodyLayerStack, sortHeaderLayer,
                rowHeaderLayer, cornerLayer, false);

        // set the group by header on top of the grid
        CompositeLayer compositeGridLayer = new CompositeLayer(1, 2);
        final GroupByHeaderLayer groupByHeaderLayer = new GroupByHeaderLayer(
                bodyLayerStack.getGroupByModel(), gridLayer,
                columnHeaderDataProvider);
        compositeGridLayer.setChildLayer(GroupByHeaderLayer.GROUP_BY_REGION,
                groupByHeaderLayer, 0, 0);
        compositeGridLayer.setChildLayer("Grid", gridLayer, 0, 1);

        // turn the auto configuration off as we want to add our header menu
        // configuration
        final NatTable natTable = new NatTable(container, compositeGridLayer,
                false);
View Full Code Here

    public static void main(String[] args) throws Exception {
        StandaloneNatExampleRunner.run(new SpanningDataLayerExample());
    }

    public Control createExampleControl(Composite parent) {
        CompositeLayer layer = new CompositeLayer(1, 1);
        layer.setChildLayer(GridRegion.BODY, new ViewportLayer(
                new SelectionLayer(new SpanningDataLayer(
                        new DummySpanningBodyDataProvider(1000000, 1000000)))),
                0, 0);
        return new NatTable(parent, layer);
    }
View Full Code Here

    public Control createExampleControl(Composite parent) {
        ILayer dataLayer = new DataLayer(new DummyBodyDataProvider(1000000,
                1000000));

        CompositeLayer compositeLayer = new CompositeLayer(1, 1);
        compositeLayer.setChildLayer(GridRegion.BODY, dataLayer, 0, 0);

        return new NatTable(parent, compositeLayer);
    }
View Full Code Here

        // build the grid layer
        GridLayer gridLayer = new GridLayer(bodyLayerStack, sortHeaderLayer,
                rowHeaderLayer, cornerLayer);

        // set the group by header on top of the grid
        CompositeLayer compositeGridLayer = new CompositeLayer(1, 2);
        final GroupByHeaderLayer groupByHeaderLayer = new GroupByHeaderLayer(
                bodyLayerStack.getGroupByModel(), gridLayer,
                columnHeaderDataProvider);
        compositeGridLayer.setChildLayer(GroupByHeaderLayer.GROUP_BY_REGION,
                groupByHeaderLayer, 0, 0);
        compositeGridLayer.setChildLayer("Grid", gridLayer, 0, 1);

        // turn the auto configuration off as we want to add our header menu
        // configuration
        final NatTable natTable = new NatTable(container, compositeGridLayer,
                false);
View Full Code Here

            int newMinOriginX = this.selectionLayer
                    .getStartXOfColumnPosition(getNumberOfLeftColumns());
            viewportLayerRight.setMinimumOriginX(newMinOriginX);

            // create a CompositeLayer that contains both ViewportLayers
            CompositeLayer compositeLayer = new CompositeLayer(2, 1);
            compositeLayer.setChildLayer("REGION_A", getViewportLayerLeft(), 0,
                    0);
            compositeLayer.setChildLayer("REGION_B", getViewportLayerRight(),
                    1, 0);

            // set the width of the left viewport to only showing 2 columns at
            // the same time
            int leftWidth = bodyDataLayer.getStartXOfColumnPosition(2);
View Full Code Here

TOP

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

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.