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

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


        // add the style configuration for hover
        natTable.addConfiguration(new AbstractRegistryConfiguration() {

            @Override
            public void configureRegistry(IConfigRegistry configRegistry) {
                Style style = new Style();
                style.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                        GUIHelper.COLOR_RED);

                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_STYLE, style,
                        DisplayMode.HOVER, GridRegion.ROW_HEADER);
View Full Code Here


        return this.oddRowCellPainter;
    }

    @Override
    protected IStyle getColumnGroupHeaderStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                cGroupHeaderBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                cGroupHeaderFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                cGroupHeaderGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                cGroupHeaderGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                cGroupHeaderHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                cGroupHeaderVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT, cGroupHeaderFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                cGroupHeaderImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                cGroupHeaderBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                cGroupHeaderPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                cGroupHeaderTextDecoration);
        return cellStyle;
    }
View Full Code Here

        return this.cGroupHeaderCellPainter;
    }

    @Override
    protected IStyle getRowGroupHeaderStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                rGroupHeaderBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                rGroupHeaderFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                rGroupHeaderGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                rGroupHeaderGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                rGroupHeaderHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                rGroupHeaderVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT, rGroupHeaderFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                rGroupHeaderImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                rGroupHeaderBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                rGroupHeaderPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                rGroupHeaderTextDecoration);
        return cellStyle;
    }
View Full Code Here

        // add the style configuration for hover
        natTable.addConfiguration(new AbstractRegistryConfiguration() {

            @Override
            public void configureRegistry(IConfigRegistry configRegistry) {
                Style style = new Style();
                style.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                        GUIHelper.COLOR_YELLOW);

                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_STYLE, style,
                        DisplayMode.HOVER);
View Full Code Here

        return this.rGroupHeaderCellPainter;
    }

    @Override
    protected IStyle getSortHeaderStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                sortHeaderBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                sortHeaderFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                sortHeaderGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                sortHeaderGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                sortHeaderHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                sortHeaderVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT, sortHeaderFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE, sortHeaderImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                sortHeaderBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                sortHeaderPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                sortHeaderTextDecoration);
        return cellStyle;
    }
View Full Code Here

        natTable.addConfiguration(new AbstractRegistryConfiguration() {

            @Override
            public void configureRegistry(IConfigRegistry configRegistry) {
                Style style = new Style();
                style.setAttributeValue(
                        CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                        HorizontalAlignmentEnum.LEFT);
                style.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                        VerticalAlignmentEnum.TOP);
                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_STYLE, style,
                        DisplayMode.NORMAL, COLUMN_ONE_LABEL);

                style = new Style();
                style.setAttributeValue(
                        CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                        HorizontalAlignmentEnum.RIGHT);
                style.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                        VerticalAlignmentEnum.BOTTOM);
                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_STYLE, style,
                        DisplayMode.NORMAL, COLUMN_TWO_LABEL);
            }
View Full Code Here

        natTable.addConfiguration(new AbstractRegistryConfiguration() {

            @Override
            public void configureRegistry(IConfigRegistry configRegistry) {
                // style that is applied when cells are hovered
                Style style = new Style();
                style.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                        GUIHelper.COLOR_YELLOW);

                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_STYLE, style,
                        DisplayMode.HOVER);

                // style that is applied when selected cells are hovered
                style = new Style();
                style.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                        GUIHelper.COLOR_GREEN);

                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_STYLE, style,
                        DisplayMode.SELECT_HOVER);
View Full Code Here

            // subdialog
            configRegistry.registerConfigAttribute(
                    EditConfigAttributes.OPEN_IN_DIALOG, Boolean.TRUE,
                    DisplayMode.EDIT, _447_EditorExample.COLUMN_FOUR_LABEL);

            Style cellStyle = new Style();
            cellStyle.setAttributeValue(
                    CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                    HorizontalAlignmentEnum.LEFT);
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, cellStyle,
                    DisplayMode.NORMAL, _447_EditorExample.COLUMN_FOUR_LABEL);
View Full Code Here

        return this.sortHeaderCellPainter;
    }

    @Override
    protected IStyle getSelectedSortHeaderStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                selectedSortHeaderBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                selectedSortHeaderFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                selectedSortHeaderGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                selectedSortHeaderGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                selectedSortHeaderHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                selectedSortHeaderVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT,
                selectedSortHeaderFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                selectedSortHeaderImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                selectedSortHeaderBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                selectedSortHeaderPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                selectedSortHeaderTextDecoration);
        return cellStyle;
    }
View Full Code Here

        return this.selectedSortHeaderCellPainter;
    }

    @Override
    protected IStyle getFilterRowStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                filterRowBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                filterRowFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                filterRowGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                filterRowGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                filterRowHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                filterRowVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT, filterRowFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE, filterRowImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                filterRowBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                filterRowPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                filterRowTextDecoration);
        return cellStyle;
    }
View Full Code Here

TOP

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

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.