Package org.eclipse.nebula.widgets.nattable.data

Examples of org.eclipse.nebula.widgets.nattable.data.IDataProvider


    private boolean visible = true;

    public GroupByHeaderLayer(GroupByModel groupByModel, ILayer gridLayer,
            IDataProvider columnHeaderDataProvider) {
        super(new DataLayer(new IDataProvider() {
            @Override
            public Object getDataValue(int columnIndex, int rowIndex) {
                return null;
            }
View Full Code Here


        String[] propertyNames = new String[] { "self", "bar" };
        IColumnPropertyAccessor<Datum> columnPropertyAccessor = new ReflectiveColumnPropertyAccessor<Datum>(
                propertyNames);

        // Column header layer
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames);
        DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
                columnHeaderDataProvider);

        ISortModel sortModel = new GlazedListsSortModel<Datum>(sortedList,
View Full Code Here

        final FreezeLayer freezeLayer = new FreezeLayer(selectionLayer);
        final CompositeFreezeLayer compositeFreezeLayer = new CompositeFreezeLayer(
                freezeLayer, bodyLayer.getViewportLayer(), selectionLayer);

        // Column header
        final IDataProvider columnHeaderDataProvider = new DummyColumnHeaderDataProvider(
                bodyDataProvider);
        final ILayer columnHeaderLayer = new ColumnHeaderLayer(
                new DefaultColumnHeaderDataLayer(columnHeaderDataProvider),
                compositeFreezeLayer, selectionLayer);

        // Row header
        final IDataProvider rowHeaderDataProvider = new DefaultRowHeaderDataProvider(
                bodyDataProvider);
        final ILayer rowHeaderLayer = new RowHeaderLayer(
                new DefaultRowHeaderDataLayer(rowHeaderDataProvider),
                compositeFreezeLayer, selectionLayer);
View Full Code Here

        CompositeFreezeLayer compFreeze = new CompositeFreezeLayer(freeze,
                viewportLayer, selectionLayer);

        // Column header layer
        final IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
        final DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
                columnHeaderDataProvider);
        ColumnHeaderLayer columnHeaderLayer = new ColumnHeaderLayer(
                columnHeaderDataLayer, compFreeze, selectionLayer);
View Full Code Here

        String[] propertyNames = new String[] { "foo", "bar" };
        IColumnPropertyAccessor<Datum> columnPropertyAccessor = new ReflectiveColumnPropertyAccessor<Datum>(
                propertyNames);

        // Column header layer
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames);
        DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
                columnHeaderDataProvider);

        ISortModel sortModel = new GlazedListsSortModel<Datum>(sortedList,
View Full Code Here

    private final SelectionLayer selectionLayer;
    private final ViewportLayer viewportLayer;

    public CalculatingBodyLayerStack(EventList<NumberValues> valuesToShow,
            ConfigRegistry configRegistry) {
        IDataProvider dataProvider = new GlazedListsDataProvider<NumberValues>(
                valuesToShow, new CalculatingDataProvider());
        bodyDataLayer = new DataLayer(dataProvider);
        glazedListsEventLayer = new GlazedListsEventLayer<NumberValues>(
                bodyDataLayer, valuesToShow);
        summaryRowLayer = new SummaryRowLayer(glazedListsEventLayer,
View Full Code Here

                valuesToShow, configRegistry);

        SelectionLayer selectionLayer = bodyLayer.getSelectionLayer();

        // Column header
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
        ILayer columnHeaderLayer = new ColumnHeaderLayer(
                new DefaultColumnHeaderDataLayer(columnHeaderDataProvider),
                bodyLayer, selectionLayer);

        // Row header
        IDataProvider rowHeaderDataProvider = new DefaultSummaryRowHeaderDataProvider(
                bodyLayer.getDataLayer().getDataProvider(), "\u2211");
        ILayer rowHeaderLayer = new RowHeaderLayer(
                new DefaultRowHeaderDataLayer(rowHeaderDataProvider),
                bodyLayer, selectionLayer);
View Full Code Here

        propertyToLabelMap.put("address.city", "City");
        propertyToLabelMap.put("favouriteFood", "Food");
        propertyToLabelMap.put("favouriteDrinks", "Drinks");
        propertyToLabelMap.put("filename", "Filename");

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

        DefaultGridLayer gridLayer = new DefaultGridLayer(bodyDataProvider,
View Full Code Here

                + "  Different style can be applied to the individual cells in the summary row\n"
                + "  Plug-in your own summary formulas via ISummaryProvider interface (Default is summation)";
    }

    public Control createExampleControl(Composite parent) {
        myDataProvider = new IDataProvider() {

            public int getColumnCount() {
                return 4;
            }
View Full Code Here

        return tableContainer;
    }

    private void createNatTable(Composite parent, final ICellPainter painter) {
        IDataProvider bodyDataProvider = new ExampleTextBodyDataProvider();
        DataLayer dataLayer = new DataLayer(bodyDataProvider);
        dataLayer.setRowHeightByPosition(0, 32);
        SelectionLayer selectionLayer = new SelectionLayer(dataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.data.IDataProvider

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.