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

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


        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                cellStyle, DisplayMode.NORMAL,
                AlternatingRowConfigLabelAccumulator.ODD_ROW_CONFIG_TYPE);

        // Check cell foreground color
        ILayerCell cell = natTable.getCellByPosition(2, 2);
        IStyle cellStyle = configRegistry.getConfigAttribute(
                CellConfigAttributes.CELL_STYLE, cell.getDisplayMode(), cell
                        .getConfigLabels().getLabels());
        Assert.assertEquals(foregroundColor, cellStyle
                .getAttributeValue(CellStyleAttributes.FOREGROUND_COLOR));

        // set up painter
View Full Code Here


        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                cellStyle, DisplayMode.NORMAL,
                AlternatingRowConfigLabelAccumulator.ODD_ROW_CONFIG_TYPE);

        // Check cell horizontal alignment
        ILayerCell cell = natTable.getCellByPosition(2, 2);
        Assert.assertEquals(
                hAlignment.name(),
                configRegistry
                        .getConfigAttribute(CellConfigAttributes.CELL_STYLE,
                                cell.getDisplayMode(),
                                cell.getConfigLabels().getLabels())
                        .getAttributeValue(
                                CellStyleAttributes.HORIZONTAL_ALIGNMENT)
                        .name());
    }
View Full Code Here

        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                cellStyle, DisplayMode.NORMAL,
                AlternatingRowConfigLabelAccumulator.EVEN_ROW_CONFIG_TYPE);

        // Check cell vertical alignment
        ILayerCell cell = natTable.getCellByPosition(2, 3);
        Assert.assertEquals(
                vAlignment.name(),
                configRegistry
                        .getConfigAttribute(CellConfigAttributes.CELL_STYLE,
                                cell.getDisplayMode(),
                                cell.getConfigLabels().getLabels())
                        .getAttributeValue(
                                CellStyleAttributes.VERTICAL_ALIGNMENT).name());
    }
View Full Code Here

                .getColumnIndexOfProperty(RowDataListFixture.PRICING_TYPE_PROP_NAME);
        Object dataValue = natTableFixture.getDataValueByPosition(columnIndex
                + ROW_HEADER_COLUMN_COUNT, 2);

        // Verify displayed value
        ILayerCell cell = natTableFixture.getCellByPosition(columnIndex
                + ROW_HEADER_COLUMN_COUNT, 2);
        TextPainter cellPainter = new TextPainter();
        Assert.assertEquals("Automatic",
                cellPainter.convertDataType(cell, configRegistry));
View Full Code Here

        // Get body layer cell corresponding to the selected body cell
        ILayer bodyLayer = gridLayer.getBodyLayer();
        // The column position is 1 because it takes into account the offset of
        // the row header
        ILayerCell cell = bodyLayer.getCellByPosition(1, 1);

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

                cellStyle, DisplayMode.SELECT,
                SelectionStyleLabels.SELECTION_ANCHOR_STYLE);

        // Select and access cell
        natTable.doCommand(new SelectCellCommand(natTable, 2, 2, false, false));
        ILayerCell cell = natTable.getCellByPosition(2, 2);
        Assert.assertEquals(DisplayMode.SELECT, cell.getDisplayMode());

        // Check for line styling
        Assert.assertEquals(
                defaultBorderStyle,
                configRegistry.getConfigAttribute(
                        CellConfigAttributes.CELL_STYLE, cell.getDisplayMode(),
                        cell.getConfigLabels().getLabels()).getAttributeValue(
                        CellStyleAttributes.BORDER_STYLE));
    }
View Full Code Here

        // 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

TOP

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

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.