Package org.eclipse.nebula.widgets.nattable.reorder

Examples of org.eclipse.nebula.widgets.nattable.reorder.ColumnReorderLayer


                }
            }
        });

        // Body layer
        ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                bodyDataLayer);
        ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
                columnReorderLayer);
        SelectionLayer selectionLayer = new SelectionLayer(columnHideShowLayer);
View Full Code Here


        DefaultBodyDataProvider<RowGroupDataFixture> bodyDataProvider = new DefaultBodyDataProvider<RowGroupDataFixture>(
                RowGroupDataListFixture.getList(2000), propertyNames);
        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);

        ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                bodyDataLayer);
        ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
                columnReorderLayer);

        RowHideShowLayer rowHideShowLayer = new RowHideShowLayer(
View Full Code Here

        DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(5,
                10);
        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        bodyDataLayer.setDefaultRowHeight(100);
        SelectionLayer selectionLayer = new SelectionLayer(
                new ColumnHideShowLayer(new ColumnReorderLayer(bodyDataLayer)));
        InvertedLayer invertedLayer = new InvertedLayer(selectionLayer);
        ViewportLayer viewportLayer = new ViewportLayer(invertedLayer);

        DummyColumnHeaderDataProvider columnHeaderDataProvider = new DummyColumnHeaderDataProvider(
                bodyDataProvider);
View Full Code Here

        // new GlazedListsEventLayer<Datum>(bodyDataLayer, treeList);
        DetailGlazedListsEventLayer<Datum> glazedListsEventLayer = new DetailGlazedListsEventLayer<Datum>(
                bodyDataLayer, treeList);

        // Body layer
        ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                glazedListsEventLayer);
        ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
                columnReorderLayer);

        RowHideShowLayer rowHideShowLayer = new RowHideShowLayer(
View Full Code Here

        GroupByDataLayer<RowDataFixture> bodyDataLayer = new GroupByDataLayer<RowDataFixture>(
                groupByModel, eventList, reflectiveColumnPropertyAccessor,
                configRegistry);

        // Body layer
        ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                bodyDataLayer);
        ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
                columnReorderLayer);
        SelectionLayer selectionLayer = new SelectionLayer(columnHideShowLayer);
View Full Code Here

        summaryRowLayer = new SummaryRowLayer(glazedListsEventLayer,
                configRegistry, false);
        summaryRowLayer
                .addConfiguration(new CalculatingSummaryRowConfiguration(
                        bodyDataLayer.getDataProvider()));
        columnReorderLayer = new ColumnReorderLayer(summaryRowLayer);
        columnHideShowLayer = new ColumnHideShowLayer(columnReorderLayer);
        selectionLayer = new SelectionLayer(columnHideShowLayer);
        viewportLayer = new ViewportLayer(selectionLayer);
        setUnderlyingLayer(viewportLayer);
View Full Code Here

        private SelectionLayer selectionLayer;

        public BodyLayerStack(IDataProvider dataProvider) {
            DataLayer bodyDataLayer = new DataLayer(dataProvider);
            ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                    bodyDataLayer);
            ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
                    columnReorderLayer);
            selectionLayer = new SelectionLayer(columnHideShowLayer);
            ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
View Full Code Here

    public Control createExampleControl(Composite parent) {
        DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(500,
                1000000);
        SelectionLayer selectionLayer = new SelectionLayer(
                new ColumnHideShowLayer(new ColumnReorderLayer(new DataLayer(
                        bodyDataProvider))));
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        DummyColumnHeaderDataProvider columnHeaderDataProvider = new DummyColumnHeaderDataProvider(
                bodyDataProvider);
View Full Code Here

     *   Index    10  11  12  13 ... 20
     *          --------------------
     *  Position   0   1  2  3 ... 20
     */
    public void returnsCorrectPositionRectangleForMultiColumnReorderLeftCase() {
        ColumnReorderLayer reorderLayer = new ColumnReorderLayer(
                new BaseDataLayerFixture(20, 20));

        // Build expected cell positions to redraw
        final Set<Rectangle> expectedPositions = new HashSet<Rectangle>();
        expectedPositions.add(new Rectangle(0, 0, 20, 20));

        reorderLayer.addLayerListener(new ILayerListener() {
            public void handleLayerEvent(ILayerEvent event) {
                ColumnReorderEvent multiReorder = (ColumnReorderEvent) event;
                assertTrue(multiReorder.getChangedPositionRectangles()
                        .containsAll(expectedPositions));
            }
        });

        // Reorder to beginning of grid
        List<Integer> fromColumnPositions = Arrays.asList(new Integer[] { 10,
                11, 12, 13 });
        reorderLayer.reorderMultipleColumnPositions(fromColumnPositions, 0);

        // Reorder to middle of grid
        expectedPositions.clear();
        expectedPositions.add(new Rectangle(10, 0, 10, 20));
        fromColumnPositions = Arrays.asList(new Integer[] { 19, 18, 17, 16 });
        reorderLayer.reorderMultipleColumnPositions(fromColumnPositions, 10);

        // Reorder to end of grid
        expectedPositions.clear();
        expectedPositions.add(new Rectangle(5, 0, 15, 20));
        fromColumnPositions = Arrays.asList(new Integer[] { 5, 6, 7, 8 });
        reorderLayer.reorderMultipleColumnPositions(fromColumnPositions, 10);
    }
View Full Code Here

     *   Index    2  3  0  1 ... 20
     *          --------------------
     *  Position   0   1  2  3 ... 20
     */
    public void returnsCorrectPositionRectangleForMultiColumnReorderRightCase() {
        ColumnReorderLayer reorderLayer = new ColumnReorderLayer(
                new BaseDataLayerFixture(20, 20));

        // Build expected cell positions to redraw
        final Set<Rectangle> expectedPositions = new HashSet<Rectangle>();
        expectedPositions.add(new Rectangle(0, 0, 20, 20));

        reorderLayer.addLayerListener(new ILayerListener() {
            public void handleLayerEvent(ILayerEvent event) {
                ColumnReorderEvent multiReorder = (ColumnReorderEvent) event;
                assertTrue(multiReorder.getChangedPositionRectangles()
                        .containsAll(expectedPositions));
            }
        });

        // Reorder from beginning of grid
        List<Integer> fromColumnPositions = Arrays
                .asList(new Integer[] { 0, 1 });
        reorderLayer.reorderMultipleColumnPositions(fromColumnPositions, 2);

        // Reorder to middle of grid
        expectedPositions.clear();
        expectedPositions.add(new Rectangle(5, 0, 15, 20));
        fromColumnPositions = Arrays.asList(new Integer[] { 5, 6, 7, 8 });
        reorderLayer.reorderMultipleColumnPositions(fromColumnPositions, 10);

        // Reorder to end of grid
        expectedPositions.clear();
        expectedPositions.add(new Rectangle(10, 0, 10, 20));
        fromColumnPositions = Arrays.asList(new Integer[] { 10, 11, 12, 13 });
        reorderLayer.reorderMultipleColumnPositions(fromColumnPositions, 19);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.reorder.ColumnReorderLayer

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.