Examples of DebugMenuConfiguration


Examples of org.eclipse.nebula.widgets.nattable.ui.menu.DebugMenuConfiguration

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

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

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

        natTable.configure();

        return natTable;
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.ui.menu.DebugMenuConfiguration

        NatTable natTable = new NatTable(comp, compositeGridLayer, false);
        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        natTable.addConfiguration(new GroupByHeaderMenuConfiguration(natTable,
                groupByHeaderLayer));
        natTable.addConfiguration(new HeaderMenuConfiguration(natTable));
        natTable.addConfiguration(new DebugMenuConfiguration(natTable));

        natTable.setConfigRegistry(configRegistry);

        natTable.configure();
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.ui.menu.DebugMenuConfiguration

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

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());

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

Examples of org.eclipse.nebula.widgets.nattable.ui.menu.DebugMenuConfiguration

        addButtonToColumn(configRegistry, natTable);
        natTable.addConfiguration(new ButtonClickConfiguration<RowDataFixture>(
                buttonPainter));

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

        natTable.setConfigRegistry(configRegistry);
        natTable.configure();

        // Layout SWT widgets. Not relevant to example code.
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.ui.menu.DebugMenuConfiguration

        // DefaultNatTableStyleConfiguration manually
        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        // override the default sort configuration and change the mouse bindings
        // to sort on a single click
        natTable.addConfiguration(new SingleClickSortConfiguration());
        natTable.addConfiguration(new DebugMenuConfiguration(natTable));

        // add some custom sort configurations regarding comparators
        natTable.addConfiguration(new AbstractRegistryConfiguration() {

            @Override
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.ui.menu.DebugMenuConfiguration

        if (tableModel.enableColumnHeaderRightClickMenu) {
            natTable.addConfiguration(new RightClickColumnHeaderMenuConfiguration(
                    natTable, tableModel));
        }

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

Examples of org.eclipse.nebula.widgets.nattable.ui.menu.DebugMenuConfiguration

        // adds the key bindings that allow space bar to be pressed to
        // expand/collapse tree nodes
        natTable.addConfiguration(new TreeLayerExpandCollapseKeyBindings(bodyLayerStack.getTreeLayer(), bodyLayerStack.getSelectionLayer()));

        natTable.addConfiguration(new DebugMenuConfiguration(natTable));

        natTable.configure();

        // set the modern theme to visualize the summary better
        final ThemeConfiguration defaultTheme = new DefaultNatTableThemeConfiguration();
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.ui.menu.DebugMenuConfiguration

        NatTable natTable = new NatTable(panel, gridLayerWithSummary, false);
        GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);

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

        // Summary row at bottom
        // The grid doesn't contain a summary row
        // Instead create a CompositeLayer 1 column 2 rows
        // first row = GridLayer
        // second row = FixedGridSummaryRowLayer
        final SummaryRowGridLayer gridLayer = new SummaryRowGridLayer(
                dataProvider, configRegistry, propertyNames, propertyToLabelMap, false);

        // since the summary row should stay at a fixed position we need to add
        // a new composite row
        // this is necessary as also the row header cell needs to be fixed

        // create a standalone summary row
        // for a grid this is the FixedGridSummaryRowLayer
        FixedGridSummaryRowLayer summaryRowLayer =
                new FixedGridSummaryRowLayer(gridLayer.getBodyDataLayer(), gridLayer, configRegistry, false);
        summaryRowLayer.addConfiguration(
                new ExampleSummaryRowGridConfiguration(gridLayer.getBodyDataLayer().getDataProvider()));
        summaryRowLayer.setSummaryRowLabel("\u2211");

        // create a composition that has the grid on top and the summary row on
        // the bottom
        CompositeLayer composite = new CompositeLayer(1, 2);
        composite.setChildLayer("GRID", gridLayer, 0, 0);
        composite.setChildLayer(SUMMARY_REGION, summaryRowLayer, 0, 1);

        natTable = new NatTable(panel, composite, false);
        GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);

        // configure a painter that renders a line on top of the summary row
        // this is necessary because the CompositeLayerPainter does not render
        // lines on the top of a region
        natTable.addOverlayPainter(new IOverlayPainter() {

            @Override
            public void paintOverlay(GC gc, ILayer layer) {
                // render a line on top of the summary row
                Color beforeColor = gc.getForeground();
                gc.setForeground(GUIHelper.COLOR_GRAY);
                int gridBorderY = gridLayer.getHeight() - 1;
                gc.drawLine(0, gridBorderY, layer.getWidth() - 1, gridBorderY);
                gc.setForeground(beforeColor);
            }
        });

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

        return panel;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.