Package org.eclipse.nebula.widgets.nattable.style.theme

Examples of org.eclipse.nebula.widgets.nattable.style.theme.ModernNatTableThemeConfiguration


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

        final ThemeConfiguration defaultTheme = new DefaultNatTableThemeConfiguration();
        final ThemeConfiguration modernTheme = new ModernNatTableThemeConfiguration();
        final ThemeConfiguration darkTheme = new DarkNatTableThemeConfiguration();

        final ThemeConfiguration conditionalDefaultTheme = new DefaultNatTableThemeConfiguration();
        conditionalDefaultTheme
                .addThemeExtension(new ConditionalStylingThemeExtension());
        final ThemeConfiguration conditionalModernTheme = new ModernNatTableThemeConfiguration();
        conditionalModernTheme
                .addThemeExtension(new ConditionalStylingThemeExtension());
        final ThemeConfiguration conditionalDarkTheme = new DarkNatTableThemeConfiguration();
        conditionalDarkTheme
                .addThemeExtension(new ConditionalStylingThemeExtension());
View Full Code Here


        // set the modern theme to visualize the summary better
        final ThemeConfiguration defaultTheme = new DefaultNatTableThemeConfiguration();
        defaultTheme.addThemeExtension(new DefaultGroupByThemeExtension());

        final ThemeConfiguration modernTheme = new ModernNatTableThemeConfiguration();
        modernTheme.addThemeExtension(new ModernGroupByThemeExtension());

        final ThemeConfiguration darkTheme = new DarkNatTableThemeConfiguration();
        darkTheme.addThemeExtension(new DarkGroupByThemeExtension());

        natTable.setTheme(modernTheme);
View Full Code Here

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

        // 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
View Full Code Here

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        natTable.addConfiguration(new HeaderMenuConfiguration(natTable));

        natTable.configure();

        natTable.setTheme(new ModernNatTableThemeConfiguration());

        return natTable;
    }
View Full Code Here

                bodyLayerStack.getEventList().add(entry);
            }
        });

        // add modern styling
        ThemeConfiguration theme = new ModernNatTableThemeConfiguration();
        theme.addThemeExtension(new ModernGroupByThemeExtension());
        natTable.setTheme(theme);

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

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.style.theme.ModernNatTableThemeConfiguration

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.