Package org.eclipse.nebula.widgets.nattable.viewport

Examples of org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer$KeepRowInsideViewportEventHandler


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

        // build the column header layer
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
        DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
View Full Code Here


            // layer for event handling of GlazedLists and PropertyChanges
            GlazedListsEventLayer<T> glazedListsEventLayer = new GlazedListsEventLayer<T>(
                    bodyDataLayer, filterList);

            this.selectionLayer = new SelectionLayer(glazedListsEventLayer);
            ViewportLayer viewportLayer = new ViewportLayer(getSelectionLayer());

            setUnderlyingLayer(viewportLayer);
        }
View Full Code Here

        IDataProvider bodyDataProvider = new DefaultBodyDataProvider<Person>(
                PersonService.getPersons(10), propertyNames);
        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        viewportLayer.setRegionName(GridRegion.BODY);

        // add the ExportCommandHandler to the ViewportLayer in order to make
        // exporting work
        viewportLayer.registerCommandHandler(new ExportCommandHandler(
                viewportLayer));

        final NatTable natTable = new NatTable(gridPanel, viewportLayer, false);

        // adding this configuration adds the styles and the painters to use
View Full Code Here

                bodyDataLayer);
        ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
                columnReorderLayer);
        final SelectionLayer selectionLayer = new SelectionLayer(
                columnHideShowLayer);
        final ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        final FreezeLayer freezeLayer = new FreezeLayer(selectionLayer);
        final CompositeFreezeLayer compositeFreezeLayer = new CompositeFreezeLayer(
                freezeLayer, viewportLayer, selectionLayer);
View Full Code Here

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

        ILayer rowHeaderLayer = new RowHeaderLayer(
                new DefaultRowHeaderDataLayer(new DefaultRowHeaderDataProvider(
                        bodyDataProvider)), viewportLayer, selectionLayer);
View Full Code Here

            // add a tree layer to visualise the grouping
            TreeLayer treeLayer = new TreeLayer(selectionLayer,
                    bodyDataLayer.getTreeRowModel());

            ViewportLayer viewportLayer = new ViewportLayer(treeLayer);

            setUnderlyingLayer(viewportLayer);
        }
View Full Code Here

        IDataProvider bodyDataProvider = new ListDataProvider<Person>(data,
                columnPropertyAccessor);
        final DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        final SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                new DefaultColumnHeaderDataProvider(propertyNames,
                        propertyToLabelMap)), viewportLayer, selectionLayer);
View Full Code Here

        IDataProvider bodyDataProvider = new DefaultBodyDataProvider<Person>(
                PersonService.getPersons(100), propertyNames);
        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        // add the PrintCommandHandler to the ViewportLayer in order to make
        // printing work
        viewportLayer.registerCommandHandler(new PrintCommandHandler(
                viewportLayer));

        final NatTable natTable = new NatTable(gridPanel, viewportLayer, false);

        // adding this configuration adds the styles and the painters to use
View Full Code Here

        // create the body layer stack
        IDataProvider bodyDataProvider = new ListDataProvider<Person>(data,
                columnPropertyAccessor);
        final DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        final SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        // create the column header layer stack
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
View Full Code Here

    public Control createExampleControl(Composite parent) {
        // To make the default edit and selection configurations work correctly,
        // the region label
        // GridRegion.BODY is necessary, which is directly set to the
        // ViewportLayer instance here.
        ViewportLayer layer = new ViewportLayer(new SelectionLayer(
                new SpanningDataLayer(new DummySpanningBodyDataProvider(100,
                        100))));
        layer.setRegionName(GridRegion.BODY);

        NatTable natTable = new NatTable(parent, layer, false);

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());

        // add configurations to enable editing
        // this is to verify that spanned cells are also editable and update the
        // data model correctly
        // @see Bug 414754
        layer.addConfiguration(new DefaultEditBindings());
        layer.addConfiguration(new DefaultEditConfiguration());
        layer.addConfiguration(new AbstractRegistryConfiguration() {

            @Override
            public void configureRegistry(IConfigRegistry configRegistry) {
                configRegistry.registerConfigAttribute(
                        EditConfigAttributes.CELL_EDITABLE_RULE,
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer$KeepRowInsideViewportEventHandler

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.