Package org.eclipse.nebula.widgets.nattable.painter

Examples of org.eclipse.nebula.widgets.nattable.painter.NatTableBorderOverlayPainter


        final NatTable natTable = new NatTable(container, gridLayer);
        GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);

        // adding a full border
        natTable.addOverlayPainter(new NatTableBorderOverlayPainter(natTable
                .getConfigRegistry()));

        Composite buttonPanel = new Composite(container, SWT.NONE);
        buttonPanel.setLayout(new GridLayout(3, true));
        GridDataFactory.fillDefaults().grab(true, false).applyTo(buttonPanel);
View Full Code Here


        // adding this configuration adds the styles and the painters to use
        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        natTable.addConfiguration(new DefaultExportBindings());

        natTable.addOverlayPainter(new NatTableBorderOverlayPainter());

        natTable.configure();

        GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);
View Full Code Here

        darkTheme.addThemeExtension(new DarkGroupByThemeExtension());

        natTable.setTheme(modernTheme);

        // add a border on every side of the table
        natTable.addOverlayPainter(new NatTableBorderOverlayPainter());

        natTable.registerCommandHandler(new DisplayPersistenceDialogCommandHandler(
                natTable));

        GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);
View Full Code Here

        // set the modern theme
        firstNatTable.setTheme(new ModernNatTableThemeConfiguration());

        // add overlay painter for full borders
        firstNatTable.addOverlayPainter(new NatTableBorderOverlayPainter());

        // create the second table
        // create the body layer stack
        final IRowDataProvider<Person> secondBodyDataProvider = new ListDataProvider<Person>(
                getFlandersList(), columnPropertyAccessor);
        final DataLayer secondBodyDataLayer = new DataLayer(
                secondBodyDataProvider);
        final SelectionLayer secondSelectionLayer = new SelectionLayer(
                secondBodyDataLayer);
        ViewportLayer secondViewportLayer = new ViewportLayer(
                secondSelectionLayer);

        // use a RowSelectionModel that will perform row selections and is able
        // to identify a row via unique ID
        secondSelectionLayer.setSelectionModel(new RowSelectionModel<Person>(
                secondSelectionLayer, secondBodyDataProvider, rowIdAccessor));

        // create the column header layer stack
        DataLayer secondColumnHeaderDataLayer = new DataLayer(
                columnHeaderDataProvider);
        ILayer secondColumnHeaderLayer = new ColumnHeaderLayer(
                secondColumnHeaderDataLayer, secondViewportLayer,
                secondSelectionLayer);

        // register custom label styling to indicate if the table is active
        secondColumnHeaderDataLayer
                .setConfigLabelAccumulator(new IConfigLabelAccumulator() {
                    @Override
                    public void accumulateConfigLabels(LabelStack configLabels,
                            int columnPosition, int rowPosition) {
                        if (!isFirstSelectionProvider) {
                            configLabels.addLabelOnTop(ACTIVE_LABEL);
                        }
                    }
                });

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

        final NatTable secondNatTable = new NatTable(panel,
                secondCompositeLayer, false);

        secondNatTable
                .addConfiguration(new DefaultNatTableStyleConfiguration());
        secondNatTable.addConfiguration(new ActiveTableStyleConfiguration());
        secondNatTable.configure();

        // set the modern theme
        secondNatTable.setTheme(new ModernNatTableThemeConfiguration());

        // add overlay painter for full borders
        secondNatTable.addOverlayPainter(new NatTableBorderOverlayPainter());

        // set ISelectionProvider
        final RowSelectionProvider<Person> selectionProvider = new RowSelectionProvider<Person>(
                firstSelectionLayer, firstBodyDataProvider);
View Full Code Here

        Transfer[] transfer = { TextTransfer.getInstance() };
        natTable.addDragSupport(DND.DROP_COPY, transfer, dndSupport);
        natTable.addDropSupport(DND.DROP_COPY, transfer, dndSupport);

        // adding a full border
        natTable.addOverlayPainter(new NatTableBorderOverlayPainter(natTable
                .getConfigRegistry()));

        return natTable;
    }
View Full Code Here

        ThemeConfiguration theme = new ModernNatTableThemeConfiguration();
        theme.addThemeExtension(new ModernGroupByThemeExtension());
        natTable.setTheme(theme);

        // add a border on every side of the table
        natTable.addOverlayPainter(new NatTableBorderOverlayPainter());

        this.natTable = natTable;

        return container;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.painter.NatTableBorderOverlayPainter

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.