Package org.eclipse.nebula.widgets.nattable.style

Examples of org.eclipse.nebula.widgets.nattable.style.VerticalAlignmentEnum


        HorizontalAlignmentEnum hAlign = horizontalAlignmentPicker
                .getSelectedAlignment();
        newStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                hAlign);

        VerticalAlignmentEnum vAlign = verticalAlignmentPicker
                .getSelectedAlignment();
        newStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                vAlign);

        return newStyle;
View Full Code Here


            style.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                    hAlign);
        }

        String vAlignPrefix = prefix + DOT + V_ALIGNMENT_PREFIX;
        VerticalAlignmentEnum vAlign = loadVAlignment(vAlignPrefix, properties);
        if (vAlign != null) {
            style.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                    vAlign);
        }
View Full Code Here

            case CENTER:
                horizontalAlignmentPadding = leftPadding / 2;
                break;
        }

        VerticalAlignmentEnum verticalAlignment = cellStyle
                .getAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT);
        int verticalAlignmentPadding = 0;
        switch (verticalAlignment) {
            case TOP:
                verticalAlignmentPadding = topPadding;
View Full Code Here

        HorizontalAlignmentEnum expecetdHAlign = style
                .getAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT);
        assertEquals(HorizontalAlignmentEnum.LEFT, expecetdHAlign);

        VerticalAlignmentEnum expecetdVAlign = style
                .getAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT);
        assertEquals(VerticalAlignmentEnum.TOP, expecetdVAlign);
    }
View Full Code Here

    // Vertical alignment
    @Test
    public void retreivedCellShouldHaveTopAlignment() {
        // Register vertical alignment
        final VerticalAlignmentEnum vAlignment = VerticalAlignmentEnum.TOP;
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                vAlignment);
        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(
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.style.VerticalAlignmentEnum

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.