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

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


        // the last rows
        ViewportLayer viewportLayerBottom = new ViewportLayer(bodyDataLayer);
        viewportLayerBottom.setMinRowPosition(10);

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

        // in order to make printing and exporting work correctly you need to
        // register the following
        // command handlers
        // although in this example printing and exporting is not enabled, we
        // show the registering
        compositeLayer
                .registerCommandHandler(new MultiTurnViewportOnCommandHandler(
                        viewportLayerTop, viewportLayerBottom));
        compositeLayer
                .registerCommandHandler(new MultiTurnViewportOffCommandHandler(
                        viewportLayerTop, viewportLayerBottom));

        // set the height of the top viewport to only showing 2 rows at the same
        // time
View Full Code Here


                new ExampleSummaryRowGridConfiguration(gridLayer.getBodyDataLayer().getDataProvider()));
        summaryRowLayer.setSummaryRowLabel("\u2211");

        // create a composition that has the grid on top and the summary row on
        // the bottom
        CompositeLayer composite = new CompositeLayer(1, 2);
        composite.setChildLayer("GRID", gridLayer, 0, 0);
        composite.setChildLayer(SUMMARY_REGION, summaryRowLayer, 0, 1);

        natTable = new NatTable(panel, composite, false);
        GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);

        // configure a painter that renders a line on top of the summary row
View Full Code Here

        // build the grid layer
        GridLayer gridLayer = new GridLayer(bodyLayerStack,
                filterRowHeaderLayer, 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

                // configure the SummaryRowLayer to be rendered standalone
                summaryRowLayer.setStandalone(true);
                summaryRowLayer.addConfiguration(
                        new ExampleSummaryRowGridConfiguration(this.bodyDataLayer.getDataProvider()));

                CompositeLayer composite = new CompositeLayer(1, 2);
                composite.setChildLayer(SUMMARY_REGION, summaryRowLayer, 0, 0);
                composite.setChildLayer(GridRegion.BODY, this.viewportLayer, 0, 1);

                setUnderlyingLayer(composite);
            }
            else {
                setUnderlyingLayer(this.viewportLayer);
View Full Code Here

        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                new DummyColumnHeaderDataProvider(bodyDataProvider)),
                viewportLayer, selectionLayer);

        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

                bodyDataProvider));
        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                new DummyColumnHeaderDataProvider(bodyDataProvider)),
                selectionLayer, selectionLayer);

        CompositeLayer compositeLayer = new CompositeLayer(1, 2);
        compositeLayer.setChildLayer(GridRegion.COLUMN_HEADER,
                columnHeaderLayer, 0, 0);
        compositeLayer.setChildLayer(GridRegion.BODY, selectionLayer, 0, 1);

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

                new DefaultRowHeaderDataProvider(bodyDataProvider));
        rowHeaderDataLayer.setDefaultColumnWidth(41);
        ILayer rowHeaderLayer = new RowHeaderLayer(rowHeaderDataLayer,
                viewportLayer, selectionLayer);

        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 DefaultRowHeaderDataProvider(bodyDataProvider));
        rowHeaderDataLayer.setDefaultColumnWidth(40);
        ILayer rowHeaderLayer = new RowHeaderLayer(rowHeaderDataLayer,
                selectionLayer, selectionLayer);

        CompositeLayer compositeLayer = new CompositeLayer(2, 1);
        compositeLayer.setChildLayer(GridRegion.ROW_HEADER, rowHeaderLayer, 0,
                0);
        compositeLayer.setChildLayer(GridRegion.BODY, selectionLayer, 1, 0);

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

        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                new DummyColumnHeaderDataProvider(bodyDataProvider)),
                viewportLayer, selectionLayer);

        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

TOP

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

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.