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

Examples of org.eclipse.nebula.widgets.nattable.grid.layer.DefaultGridLayer


        propertyToLabelMap.put("columnFiveNumber", "C 5");
        propertyToLabelMap.put("columnSixNumber", "C 6");
        propertyToLabelMap.put("columnSevenNumber", "C 7");
        propertyToLabelMap.put("columnEightNumber", "C 8");

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

        final ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyDataLayer);
View Full Code Here


        propertyToLabelMap.put("toDate", "To");

        valuesToShow.addAll(createEventData());

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

        IRowDataProvider<EventData> bodyDataProvider = (IRowDataProvider<EventData>) bodyDataLayer
                .getDataProvider();
        bodyDataLayer
                .setConfigLabelAccumulator(new CrossValidationLabelAccumulator(
View Full Code Here

        IDataProvider bodyDataProvider = new ListDataProvider<ExtendedPersonWithAddress>(
                PersonService.getExtendedPersonsWithAddress(10),
                new ExtendedReflectiveColumnPropertyAccessor<ExtendedPersonWithAddress>(
                        propertyNames));

        DefaultGridLayer gridLayer = new DefaultGridLayer(bodyDataProvider,
                new DefaultColumnHeaderDataProvider(propertyNames,
                        propertyToLabelMap));

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

        final ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyDataLayer);
        bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator);
View Full Code Here

        IColumnPropertyAccessor<Person> columnPropertyAccessor = new ReflectiveColumnPropertyAccessor<Person>(
                propertyNames);
        ListDataProvider<Person> listDataProvider = new ListDataProvider<Person>(
                myList, columnPropertyAccessor);
        DefaultGridLayer gridLayer = new DefaultGridLayer(listDataProvider,
                new DummyColumnHeaderDataProvider(listDataProvider));
        final DefaultBodyLayerStack bodyLayer = gridLayer.getBodyLayer();

        // Custom label "FOO" for cell at column, row index (1, 5)
        IConfigLabelAccumulator cellLabelAccumulator = new IConfigLabelAccumulator() {
            public void accumulateConfigLabels(LabelStack configLabels,
                    int columnPosition, int rowPosition) {
View Full Code Here

        // Corner
        final DefaultCornerDataProvider cornerDataProvider = new DefaultCornerDataProvider(
                defaultColumnHeaderDataProvider, rowHeaderDataProvider);

        // Grid
        GridLayer gridLayer = new DefaultGridLayer(blinkingLayer,
                new DefaultColumnHeaderDataLayer(
                        defaultColumnHeaderDataProvider),
                new DefaultRowHeaderDataLayer(rowHeaderDataProvider),
                new DataLayer(cornerDataProvider));
View Full Code Here

        propertyToLabelMap.put("columnTwoNumber", "Column 2");
        propertyToLabelMap.put("columnThreeNumber", "Column 3");
        propertyToLabelMap.put("columnFourNumber", "Column 4");
        propertyToLabelMap.put("columnFiveNumber", "Column 5");

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

        final ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
                bodyDataLayer);
        bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator);
        registerColumnLabels(columnLabelAccumulator);
View Full Code Here

                getColumnLabel(columnHeaderLayer, getDataLayer(), 1));
    }

    @Test
    public void getVisibleColumnEntries() throws Exception {
        DefaultGridLayer gridLayer = new DefaultGridLayer(
                RowDataListFixture.getList(),
                RowDataListFixture.getPropertyNames(),
                RowDataListFixture.getPropertyToLabelMap());
        ColumnHideShowLayer columnHideShowLayer = gridLayer.getBodyLayer()
                .getColumnHideShowLayer();
        ColumnHeaderLayer columnHeaderLayer = gridLayer.getColumnHeaderLayer();
        DataLayer columnHeaderDataLayer = (DataLayer) gridLayer
                .getColumnHeaderDataLayer();

        List<ColumnEntry> visibleEntries = ColumnChooserUtils
                .getVisibleColumnsEntries(columnHideShowLayer,
                        columnHeaderLayer, columnHeaderDataLayer);

        // All columns shown
        assertEquals(RowDataListFixture.getPropertyNames().length,
                visibleEntries.size());

        // Hide a few columns
        gridLayer.getBodyLayer().getColumnHideShowLayer()
                .hideColumnPositions(Arrays.asList(1, 2, 3));
        visibleEntries = ColumnChooserUtils.getVisibleColumnsEntries(
                columnHideShowLayer, columnHeaderLayer, columnHeaderDataLayer);
        assertEquals(RowDataListFixture.getPropertyNames().length - 3,
                visibleEntries.size());
View Full Code Here

    private CopyDataCommandHandler commandHandler;

    @Before
    public void setUp() {
        final IDataProvider bodyDataProvider = new DataProviderFixture(10, 10);
        gridLayer = new DefaultGridLayer(bodyDataProvider,
                getColumnHeaderDataProvider(bodyDataProvider),
                getRowHeaderDataProvider(bodyDataProvider));
        gridLayer.setClientAreaProvider(new IClientAreaProvider() {

            public Rectangle getClientArea() {
View Full Code Here

                bodyDataProvider);
        DefaultCornerDataProvider defaultCornerDataProvider = new DefaultCornerDataProvider(
                defaultColumnHeaderDataProvider, rowHeaderDataProvider);

        // Build composite for all regions
        DefaultGridLayer gridLayer = new DefaultGridLayer(blinkingLayer,
                new DefaultColumnHeaderDataLayer(
                        defaultColumnHeaderDataProvider),
                new DefaultRowHeaderDataLayer(rowHeaderDataProvider),
                new DataLayer(defaultCornerDataProvider));
View Full Code Here

                return 1;
            }

        };

        ILayer layer = new DefaultGridLayer(listDataProvider,
                columnHeaderDataProvider);

        return new NatTable(parent, layer);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.grid.layer.DefaultGridLayer

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.