Package org.eclipse.nebula.widgets.nattable.layer.cell

Examples of org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator


        return new AbstractRegistryConfiguration() {

            public void configureRegistry(IConfigRegistry configRegistry) {
                // Add label accumulator
                ColumnOverrideLabelAccumulator labelAccumulator = new ColumnOverrideLabelAccumulator(
                        columnHeaderDataLayer);
                columnHeaderDataLayer
                        .setConfigLabelAccumulator(labelAccumulator);

                // Register labels
                labelAccumulator
                        .registerColumnOverrides(
                                RowDataListFixture
                                        .getColumnIndexOfProperty(RowDataListFixture.RATING_PROP_NAME),
                                CUSTOM_COMPARATOR_LABEL);

                labelAccumulator
                        .registerColumnOverrides(
                                RowDataListFixture
                                        .getColumnIndexOfProperty(RowDataListFixture.ASK_PRICE_PROP_NAME),
                                NO_SORT_LABEL);
View Full Code Here


        });

        this.natTable.addConfiguration(new SingleClickSortConfiguration());

        // Editing
        ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyLayer.getBodyDataLayer());
        bodyLayer.getBodyDataLayer().setConfigLabelAccumulator(
                columnLabelAccumulator);
        this.natTable.addConfiguration(EditableGridExample
                .editableGridConfiguration(columnLabelAccumulator,
View Full Code Here

        IDataProvider dataProvider = underlyingLayer.getBodyDataProvider();

        // NOTE: Register the accumulator on the body data layer.
        // This ensures that the labels are bound to the column index and are
        // unaffected by column order.
        final ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyDataLayer);
        bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator);

        NatTable natTable = new NatTable(parent, underlyingLayer, false);
        natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
View Full Code Here

        IDataProvider dataProvider = bodyDataLayer.getDataProvider();

        // NOTE: Register the accumulator on the body data layer.
        // This ensures that the labels are bound to the column index and are
        // unaffected by column order.
        final ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyDataLayer);
        bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator);

        NatTable natTable = new NatTable(parent, gridLayer, false);
View Full Code Here

                        propertyToLabelMap));

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

        final ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyDataLayer);
        bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator);
        registerColumnLabels(columnLabelAccumulator);

        natTable = new NatTable(parent, gridLayer, false);
View Full Code Here

        CalculatingGridLayer gridLayer = new CalculatingGridLayer(valuesToShow,
                configRegistry, propertyNames, propertyToLabelMap);
        DataLayer bodyDataLayer = gridLayer.getBodyDataLayer();

        final ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyDataLayer);
        bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator);
        registerColumnLabels(columnLabelAccumulator);

        final NatTable natTable = new NatTable(gridPanel, gridLayer, false);
View Full Code Here

        DefaultGridLayer gridLayer = new DefaultGridLayer(
                createNumberValuesList(), propertyNames, propertyToLabelMap);
        DataLayer bodyDataLayer = (DataLayer) gridLayer.getBodyDataLayer();

        final ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyDataLayer);
        bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator);
        registerColumnLabels(columnLabelAccumulator);

        NatTable natTable = new NatTable(parent, gridLayer, false);
View Full Code Here

                                .getDataLayer(),
                        tableModel.columnCategoriesModel));
    }

    protected void configureColumnProperties() {
        columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyLayer.getDataLayer());
        bodyLayer.addLabelAccumulator(columnLabelAccumulator);

        for (int colIndex = 0; colIndex < columns.length; colIndex++) {
            Integer width = columns[colIndex].width;
View Full Code Here

            }
        }
    }

    protected void configureSorting() {
        ColumnOverrideLabelAccumulator columnHeaderLabelAccumulator = new ColumnOverrideLabelAccumulator(
                columnHeaderLayer.getDataLayer());
        columnHeaderLayer.addLabelAccumulator(columnHeaderLabelAccumulator);

        for (int colIndex = 0; colIndex < columns.length; colIndex++) {
            String columnHeaderLabel = COLUMN_HEADER_COLUMN_LABEL_PREFIX
                    + colIndex;

            // Register an accumulator on the Column Header layer (since it
            // triggers sort)
            columnHeaderLabelAccumulator.registerColumnOverrides(colIndex,
                    columnHeaderLabel);

            if (columns[colIndex].isSortable) {
                Comparator<?> comparator = columns[colIndex].comparator;
                configRegistry.registerConfigAttribute(
View Full Code Here

                PersonService.getExtendedPersonsWithAddress(10),
                configRegistry, propertyNames, propertyToLabelMap);

        final DataLayer bodyDataLayer = gridLayer.getBodyDataLayer();

        final ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyDataLayer);
        bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator);
        registerColumnLabels(columnLabelAccumulator);

        final NatTable natTable = new NatTable(parent, gridLayer, false);
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator

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.