Package org.eclipse.nebula.widgets.nattable.examples.fixtures

Examples of org.eclipse.nebula.widgets.nattable.examples.fixtures.SelectionExampleGridLayer


                + "\n"
                + "Note: The button is 'drawn' using a custom painter. This is more efficient than using a Button widget.";
    }

    public Control createExampleControl(Composite parent) {
        gridLayer = new SelectionExampleGridLayer();
        NatTable natTable = new NatTable(parent, gridLayer, false);
        IConfigRegistry configRegistry = new ConfigRegistry();

        DataLayer bodyDataLayer = gridLayer.getBodyDataLayer();
View Full Code Here


                + "You can apply labels in any fashion you like by implementing the IConfigLabelAccumulator interface. "
                + "Out of the box, labels can be applied to whole columns, rows and cells.";
    }

    public Control createExampleControl(Composite parent) {
        SelectionExampleGridLayer gridLayer = new SelectionExampleGridLayer();
        NatTable natTable = new NatTable(parent, gridLayer, false);

        DataLayer bodyDataLayer = (DataLayer) gridLayer.getBodyDataLayer();

        // Label accumulator - adds labels to all cells with the given data
        // value
        CellOverrideLabelAccumulator<RowDataFixture> cellLabelAccumulator = new CellOverrideLabelAccumulator<RowDataFixture>(
                gridLayer.getBodyDataProvider());
        cellLabelAccumulator.registerOverride("AAA", 2, CELL_LABEL);

        // Register your cell style, against the label applied to the cell
        // Other configuration which can be added (apart from style) include
        // CellConfigAttributes, EditConfigAttributes, SortConfigAttributes etc.
        IConfigRegistry configRegistry = new ConfigRegistry();
        addColumnHighlight(configRegistry);

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

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
        natTable.setConfigRegistry(configRegistry);
View Full Code Here

                + "Events are fired by the tables when any selection occurs. These can be hooked up "
                + "to trigger business actions as required.";
    }

    public Control createExampleControl(Composite parent) {
        gridLayer = new SelectionExampleGridLayer();
        nattable = new NatTable(parent, gridLayer, false);

        nattable.addConfiguration(new DefaultNatTableStyleConfiguration());
        nattable.addConfiguration(new HeaderMenuConfiguration(nattable));
        nattable.addConfiguration(new DefaultSelectionStyleConfiguration());
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.examples.fixtures.SelectionExampleGridLayer

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.