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

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


        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        // create the column header layer stack
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                columnHeaderDataProvider), viewportLayer, selectionLayer);

        // create the row header layer stack
        IDataProvider rowHeaderDataProvider = new DefaultRowHeaderDataProvider(
                bodyDataProvider);
View Full Code Here


        // build the column header layer
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
        DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
                columnHeaderDataProvider);
        ILayer columnHeaderLayer = new ColumnHeaderLayer(columnHeaderDataLayer,
                bodyLayerStack, bodyLayerStack.getSelectionLayer());

        // example on how to configure a different icon if a filter is applied
        ComboBoxFilterRowHeaderComposite<MyRowObject> filterRowHeaderLayer = new ComboBoxFilterRowHeaderComposite<MyRowObject>(
                bodyLayerStack.getFilterList(),
View Full Code Here

        // build the column header layer
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
        DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
                columnHeaderDataProvider);
        ColumnHeaderLayer columnHeaderLayer = new ColumnHeaderLayer(
                columnHeaderDataLayer, bodyLayerStack,
                bodyLayerStack.getSelectionLayer());

        // add sorting
        SortHeaderLayer<ExtendedPersonWithAddress> sortHeaderLayer = new SortHeaderLayer<ExtendedPersonWithAddress>(
View Full Code Here

            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 =
View Full Code Here

        // The column position is a grid layer position
        gridLayer
                .doCommand(new SelectCellCommand(gridLayer, 2, 2, false, false));

        // Get column header cell corresponding to the selected body cell
        ColumnHeaderLayer columnHeaderLayer = (ColumnHeaderLayer) gridLayer
                .getChildLayerByLayoutCoordinate(1, 0);
        // The column position is 1 because it takes into account the offset of
        // the row header
        ILayerCell cell = columnHeaderLayer.getCellByPosition(1, 0);

        // Assert the cell is in selected state
        Assert.assertEquals(DisplayMode.SELECT, cell.getDisplayMode());
    }
View Full Code Here

    public void shouldReturnFullySelectedStyle() {
        // Select full column
        gridLayer.doCommand(new ViewportSelectColumnCommand(gridLayer, 2,
                false, false));

        ColumnHeaderLayer columnHeaderLayer = (ColumnHeaderLayer) gridLayer
                .getChildLayerByLayoutCoordinate(1, 0);

        // Since I selected using grid coordinates, the column position should
        // be 1 rather than 2
        int columnPosition = gridLayer.localToUnderlyingColumnPosition(2);
        final LabelStack labelStack = columnHeaderLayer
                .getConfigLabelsByPosition(columnPosition, 0);

        Assert.assertTrue(labelStack
                .hasLabel(SelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE));
View Full Code Here

                1000000);
        SelectionLayer selectionLayer = new SelectionLayer(
                new ColumnReorderLayer(new DataLayer(bodyDataProvider)));
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                new DummyColumnHeaderDataProvider(bodyDataProvider)),
                viewportLayer, selectionLayer);

        CompositeLayer compositeLayer = new CompositeLayer(1, 2);
        compositeLayer.setChildLayer(GridRegion.COLUMN_HEADER,
View Full Code Here

        // Column header
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
        DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
                columnHeaderDataProvider);
        columnHeaderLayer = new ColumnHeaderLayer(columnHeaderDataLayer,
                bodyLayer, bodyLayer.getSelectionLayer());
        ColumnGroupHeaderLayer columnGroupHeaderLayer = new ColumnGroupHeaderLayer(
                columnHeaderLayer, bodyLayer.getSelectionLayer(),
                columnGroupModel);
View Full Code Here

    public Control createExampleControl(Composite parent) {
        DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(
                1000000, 1000000);
        SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(
                bodyDataProvider));
        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                new DummyColumnHeaderDataProvider(bodyDataProvider)),
                selectionLayer, selectionLayer);

        CompositeLayer compositeLayer = new CompositeLayer(1, 2);
        compositeLayer.setChildLayer(GridRegion.COLUMN_HEADER,
View Full Code Here

                1000000);
        SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(
                bodyDataProvider));
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                new DummyColumnHeaderDataProvider(bodyDataProvider)),
                viewportLayer, selectionLayer);

        CompositeLayer compositeLayer = new CompositeLayer(1, 2);
        compositeLayer.setChildLayer(GridRegion.COLUMN_HEADER,
View Full Code Here

TOP

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

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.