Package org.eclipse.nebula.widgets.nattable.config

Examples of org.eclipse.nebula.widgets.nattable.config.DefaultNatTableStyleConfiguration


    @Override
    public Control createExampleControl(Composite parent) {
        NatTable natTable = setup(parent);

        addCustomStyling(natTable);
        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        addColumnHighlight(natTable.getConfigRegistry());

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());

        natTable.addConfiguration(new DebugMenuConfiguration(natTable));
        natTable.configure();
        return natTable;
    }
View Full Code Here


    private void addCustomStyling(NatTable natTable) {
        // Setup NatTable default styling

        // NOTE: Getting the colors and fonts from the GUIHelper ensures that
        // they are disposed properly (required by SWT)
        DefaultNatTableStyleConfiguration natTableConfiguration = new DefaultNatTableStyleConfiguration();
        natTableConfiguration.bgColor = GUIHelper.getColor(249, 172, 7);
        natTableConfiguration.fgColor = GUIHelper.getColor(30, 76, 19);
        natTableConfiguration.hAlign = HorizontalAlignmentEnum.LEFT;
        natTableConfiguration.vAlign = VerticalAlignmentEnum.TOP;
View Full Code Here

        final ColumnStructureUpdatesExampleGridLayer<PricingDataBean> glazedListsGridLayer = new ColumnStructureUpdatesExampleGridLayer<PricingDataBean>(
                rowObjectsGlazedList, propertyNames, propertyToLabelMap,
                configRegistry, true);
        final NatTable natTable = new NatTable(parent, glazedListsGridLayer,
                false);
        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        natTable.setConfigRegistry(configRegistry);
        natTable.getConfigRegistry().registerConfigAttribute(
                EditConfigAttributes.CELL_EDITABLE_RULE,
                IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "ODD_BODY");
        natTable.getConfigRegistry().registerConfigAttribute(
View Full Code Here

                bodyLayer.getSelectionLayer(),
                bodyLayer.getColumnHideShowLayer(), columnHeaderLayer,
                columnHeaderDataLayer, columnGroupHeaderLayer, columnGroupModel);
        bodyLayer.registerCommandHandler(columnChooserCommandHandler);

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        natTable.addConfiguration(new HeaderMenuConfiguration(natTable) {
            @Override
            protected PopupMenuBuilder createColumnHeaderMenu(NatTable natTable) {
                return super.createColumnHeaderMenu(natTable)
                        .withColumnChooserMenuItem();
View Full Code Here

    public Control createExampleControl(Composite parent) {
        IConfigRegistry configRegistry = new ConfigRegistry();
        ILayer underlyingLayer = new FilterRowExampleGridLayer(configRegistry);

        NatTable natTable = new NatTable(parent, underlyingLayer, false);
        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        natTable.addConfiguration(new HeaderMenuConfiguration(natTable));
        // natTable.addConfiguration(new DebugMenuConfiguration(natTable));
        natTable.addConfiguration(new FilterRowCustomConfiguration() {
            @Override
            public void configureRegistry(IConfigRegistry configRegistry) {
View Full Code Here

                columnHeaderLayer, 0, 0);
        compositeLayer.setChildLayer(GridRegion.BODY, viewportLayer, 0, 1);

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

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration() {
            {
                vAlign = VerticalAlignmentEnum.TOP;
                hAlign = HorizontalAlignmentEnum.LEFT;
                cellPainter = new LineBorderDecorator(painter);
            }
View Full Code Here

                columnHeaderLayer, 0, 0);
        compositeLayer.setChildLayer(GridRegion.BODY, viewportLayer, 0, 1);

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

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration() {
            {
                vAlign = VerticalAlignmentEnum.TOP;
                hAlign = HorizontalAlignmentEnum.LEFT;
                cellPainter = new LineBorderDecorator(painter);
            }
View Full Code Here

                columnHeaderLayer, 0, 0);
        compositeLayer.setChildLayer(GridRegion.BODY, viewportLayer, 0, 1);

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

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration() {
            {
                vAlign = VerticalAlignmentEnum.TOP;
                hAlign = HorizontalAlignmentEnum.LEFT;
                cellPainter = new LineBorderDecorator(painter);
                font = GUIHelper.getFont(new FontData("Arial", 20, SWT.NORMAL));
View Full Code Here

                columnHeaderLayer, 0, 0);
        compositeLayer.setChildLayer(GridRegion.BODY, viewportLayer, 0, 1);

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

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration() {
            {
                vAlign = VerticalAlignmentEnum.MIDDLE;
                hAlign = HorizontalAlignmentEnum.LEFT;
                cellPainter = new LineBorderDecorator(painter);
                font = GUIHelper.getFont(new FontData("Arial", 20, SWT.NORMAL));
View Full Code Here

        // Register label accumulator
        bodyDataLayer.setConfigLabelAccumulator(cellLabelAccumulator);
        gridLayer.getSelectionLayer().addConfiguration(
                new DefaultSelectionLayerConfiguration());

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        natTable.setConfigRegistry(configRegistry);

        natTable.configure();
        return natTable;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.config.DefaultNatTableStyleConfiguration

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.