Examples of CellStyleProxy


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

        final List<String> configLabels = this.labelStack.getLabels();
        this.displayConverter = configRegistry.getConfigAttribute(
                CellConfigAttributes.DISPLAY_CONVERTER,
                DisplayMode.EDIT,
                configLabels);
        this.cellStyle = new CellStyleProxy(configRegistry, DisplayMode.EDIT, configLabels);
        this.dataValidator = configRegistry.getConfigAttribute(
                EditConfigAttributes.DATA_VALIDATOR,
                DisplayMode.EDIT,
                configLabels);
View Full Code Here

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

                configRegistry, DisplayMode.NORMAL);

        // If the cell is selected, get it's selected background colour and add
        // to the blending mix.
        if (cell.getDisplayMode().equals(DisplayMode.SELECT)) {
            final IStyle cellStyle = new CellStyleProxy(configRegistry,
                    DisplayMode.SELECT, cell.getConfigLabels().getLabels());
            colours.add(cellStyle
                    .getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR));
        }

        if (colours.size() == 0) {
            return null;
View Full Code Here

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

    @Override
    public void exportCell(OutputStream outputStream,
            Object exportDisplayValue, ILayerCell cell,
            IConfigRegistry configRegistry) throws IOException {
        CellStyleProxy cellStyle = new CellStyleProxy(
                configRegistry,
                DisplayMode.NORMAL,
                cell.getConfigLabels().getLabels());
        Color fg = cellStyle.getAttributeValue(CellStyleAttributes.FOREGROUND_COLOR);
        Color bg = cellStyle.getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR);
        Font font = cellStyle.getAttributeValue(CellStyleAttributes.FONT);

        String htmlAttributes = String.format("style='color: %s; background-color: %s; %s;'", //$NON-NLS-1$
                getColorInCSSFormat(fg), getColorInCSSFormat(bg),
                getFontInCSSFormat(font));
View Full Code Here

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

            int lastColumn = columnPosition + columnSpan - 1;
            xlSheet.addMergedRegion(new CellRangeAddress(rowPosition, lastRow,
                    columnPosition, lastColumn));
        }

        CellStyleProxy cellStyle = new CellStyleProxy(configRegistry,
                DisplayMode.NORMAL, cell.getConfigLabels().getLabels());
        Color fg = cellStyle
                .getAttributeValue(CellStyleAttributes.FOREGROUND_COLOR);
        Color bg = cellStyle
                .getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR);
        org.eclipse.swt.graphics.Font font = cellStyle
                .getAttributeValue(CellStyleAttributes.FONT);
        FontData fontData = font.getFontData()[0];
        String dataFormat = null;

        int hAlign = HorizontalAlignmentEnum.getSWTStyle(cellStyle);
View Full Code Here

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

        // SELECT mode has a 'default' horizontal align attribute registered
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                testCellStyle2, DisplayMode.SELECT);

        // The 'default' from SELECT gets picked up
        StyleProxy cellStyleProxy = new CellStyleProxy(configRegistry,
                DisplayMode.SELECT, Arrays.asList(TEST_CONFIG_LABEL1));
        HorizontalAlignmentEnum alignmentFromProxy = cellStyleProxy
                .getAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT);

        Assert.assertEquals(HorizontalAlignmentEnum.CENTER, alignmentFromProxy);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.