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

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


            this.bodyDataProvider = bodyDataProvider;

            // create and set the body layer stack
            this.bodyDataLayer = new DataLayer(bodyDataProvider);
            ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(this.bodyDataLayer);
            ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(columnReorderLayer);
            this.selectionLayer = new SelectionLayer(columnHideShowLayer);
            setBodyLayer(this.selectionLayer);

            // create and set the column header layer stack
View Full Code Here


                propertyNames);

        IRowDataProvider<Person> bodyDataProvider = new ListDataProvider<Person>(
                data, columnPropertyAccessor);
        final DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        ColumnReorderLayer reorderLayer = new ColumnReorderLayer(bodyDataLayer);
        final SelectionLayer selectionLayer = new SelectionLayer(reorderLayer);

        // set row selection model with single selection enabled
        selectionLayer.setSelectionModel(new RowSelectionModel<Person>(
                selectionLayer, bodyDataProvider, new IRowIdAccessor<Person>() {
View Full Code Here

    @Test
    public void getColumnWidthWhenTheColumnPositionsHaveBeenConverted()
            throws Exception {
        DataLayerFixture dataLayer = new DataLayerFixture();
        // Indexes re-ordered: 4 1 0 2 3
        ColumnReorderLayer reorderLayerFixture = new ColumnReorderLayerFixture(
                dataLayer);

        MultiColumnResizeCommand resizeCommand = new MultiColumnResizeCommand(
                reorderLayerFixture, new int[] { 1, 2 }, new int[] { 100, 150 });
        reorderLayerFixture.doCommand(resizeCommand);

        // As the Commands goes down the stack - positions might get converted
        // to entirely different values.
        Assert.assertEquals(-1, resizeCommand.getCommonColumnWidth());
        Assert.assertEquals(-1, resizeCommand.getColumnWidth(5));
View Full Code Here

                    this.bodyDataLayer, filterList);

            SummaryRowLayer summaryRowLayer = new SummaryRowLayer(
                    glazedListsEventLayer, configRegistry, false);

            ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                    summaryRowLayer);
            ColumnGroupReorderLayer columnGroupReorderLayer = new ColumnGroupReorderLayer(
                    columnReorderLayer, columnGroupModel);
            this.columnHideShowLayer = new ColumnHideShowLayer(
                    columnGroupReorderLayer);
View Full Code Here

        // the ViewportLayer
        // directly as body layer is also working.
        IDataProvider bodyDataProvider = new DefaultBodyDataProvider<Person>(
                PersonService.getPersons(10), propertyNames);
        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                bodyDataLayer);
        SelectionLayer selectionLayer = new SelectionLayer(columnReorderLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        // build the column header layer
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

        // the ViewportLayer
        // directly as body layer is also working.
        IDataProvider bodyDataProvider = new DefaultBodyDataProvider<Person>(
                PersonService.getPersons(10), propertyNames);
        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                bodyDataLayer);
        RowReorderLayer rowReorderLayer = new RowReorderLayer(
                columnReorderLayer);
        final SelectionLayer selectionLayer = new SelectionLayer(
                rowReorderLayer);
View Full Code Here

        // directly as body layer is also working.
        IDataProvider bodyDataProvider = new ListDataProvider<ExtendedPersonWithAddress>(
                PersonService.getExtendedPersonsWithAddress(10),
                columnPropertyAccessor);
        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                bodyDataLayer);
        ColumnGroupReorderLayer columnGroupReorderLayer = new ColumnGroupReorderLayer(
                columnReorderLayer, columnGroupModel);
        ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
                columnGroupReorderLayer);
View Full Code Here

    private CompositeFreezeLayer compositeFreezeLayer;

    @Before
    public void setup() {
        this.dataLayer = new DataLayer(this.testDataProvider);
        this.reorderLayer = new ColumnReorderLayer(this.dataLayer);
        this.rowHideShowLayer = new RowHideShowLayer(this.reorderLayer);
        this.columnHideShowLayer = new ColumnHideShowLayer(this.rowHideShowLayer);
        this.selectionLayer = new SelectionLayer(this.columnHideShowLayer);
        this.viewportLayer = new ViewportLayer(this.selectionLayer);
        this.freezeLayer = new FreezeLayer(this.selectionLayer);
View Full Code Here

    private ColumnHideShowLayer hideShowLayer;
    private ColumnReorderLayer reorderLayer;

    @Before
    public void setup() {
        reorderLayer = new ColumnReorderLayer(new BaseDataLayerFixture(10, 10));
        hideShowLayer = new ColumnHideShowLayer(reorderLayer);
        freezeLayer = new FreezeLayer(hideShowLayer);
        freezeLayer.setTopLeftPosition(1, 0);
        freezeLayer.setBottomRightPosition(3, 3);
    }
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.