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

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


        return this.defaultCellPainter;
    }

    @Override
    protected IStyle getColumnHeaderStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                cHeaderBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                cHeaderFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                cHeaderGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                cHeaderGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                cHeaderHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                cHeaderVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT, cHeaderFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE, cHeaderImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                cHeaderBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                cHeaderPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                cHeaderTextDecoration);
        return cellStyle;
    }
View Full Code Here


        natTable.configure();
        return natTable;
    }

    private void addColumnHighlight(IConfigRegistry configRegistry) {
        Style style = new Style();
        style.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                GUIHelper.COLOR_RED);

        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, // attribute
                                                                                // to
                                                                                // apply
View Full Code Here

     *
     * @return The {@link IStyle} that should be used to render the GroupBy
     *         region in a NatTable.
     */
    protected IStyle getGroupByStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                groupByBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                groupByFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                groupByGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                groupByGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                groupByHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                groupByVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT, groupByFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE, groupByImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                groupByBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                groupByPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                groupByTextDecoration);
        return cellStyle;
    }
View Full Code Here

        @Override
        public void configureRegistry(IConfigRegistry configRegistry) {
            super.configureRegistry(configRegistry);

            Style errorStyle = new Style();
            errorStyle
                    .setAttributeValue(CellStyleAttributes.IMAGE, ERROR_IMAGE);
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, errorStyle,
                    DisplayMode.NORMAL, Level.SEVERE.toString());

            Style warningStyle = new Style();
            warningStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                    WARNING_IMAGE);
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, warningStyle,
                    DisplayMode.NORMAL, Level.WARNING.toString());

            Style informationStyle = new Style();
            informationStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                    INFORMATION_IMAGE);
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, informationStyle,
                    DisplayMode.NORMAL, Level.INFO.toString());
        }
View Full Code Here

     *
     * @return The {@link IStyle} that should be used to render the GroupBy
     *         object rows in a NatTable.
     */
    protected IStyle getGroupByObjectStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                groupByObjectBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                groupByObjectFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                groupByObjectGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                groupByObjectGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                groupByObjectHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                groupByObjectVAlign);
        cellStyle
                .setAttributeValue(CellStyleAttributes.FONT, groupByObjectFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                groupByObjectImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                groupByObjectBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                groupByObjectPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                groupByObjectTextDecoration);
        return cellStyle;
    }
View Full Code Here

     *
     * @return The {@link IStyle} that should be used to render the selected
     *         GroupBy object rows in a NatTable.
     */
    protected IStyle getGroupByObjectSelectionStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                groupByObjectSelectionBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                groupByObjectSelectionFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                groupByObjectSelectionGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                groupByObjectSelectionGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                groupByObjectSelectionHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                groupByObjectSelectionVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT,
                groupByObjectSelectionFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                groupByObjectSelectionImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                groupByObjectSelectionBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                groupByObjectSelectionPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                groupByObjectSelectionTextDecoration);
        return cellStyle;
    }
View Full Code Here

     *
     * @return The {@link IStyle} that should be used to render the GroupBy
     *         summary row cells in a NatTable.
     */
    protected IStyle getGroupBySummaryStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                groupBySummaryBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                groupBySummaryFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                groupBySummaryGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                groupBySummaryGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                groupBySummaryHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                groupBySummaryVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT,
                groupBySummaryFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                groupBySummaryImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                groupBySummaryBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                groupBySummaryPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                groupBySummaryTextDecoration);
        return cellStyle;
    }
View Full Code Here

            @Override
            public void configureRegistry(IConfigRegistry configRegistry) {
                super.configureRegistry(configRegistry);

                // Shade the row to be slightly darker than the blue background.
                final Style rowStyle = new Style();
                rowStyle.setAttributeValue(
                        CellStyleAttributes.BACKGROUND_COLOR,
                        GUIHelper.getColor(197, 212, 231));
                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_STYLE, rowStyle,
                        DisplayMode.NORMAL, GridRegion.FILTER_ROW);
View Full Code Here

        configRegistry.registerConfigAttribute(
                BlinkConfigAttributes.BLINK_RESOLVER, getBlinkResolver(),
                DisplayMode.NORMAL);

        // Styles
        Style cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                GUIHelper.COLOR_GREEN);
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                cellStyle, DisplayMode.NORMAL, BLINK_UP_CONFIG_LABEL);

        cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                GUIHelper.COLOR_RED);
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                cellStyle, DisplayMode.NORMAL, BLINK_DOWN_CONFIG_LABEL);
    }
View Full Code Here

        configRegistry.registerConfigAttribute(
                BlinkConfigAttributes.BLINK_RESOLVER, getBlinkResolver(),
                DisplayMode.NORMAL);

        // Styles
        Style cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                Display.getDefault().getSystemColor(SWT.COLOR_GREEN));
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                cellStyle, DisplayMode.NORMAL, BLINK_UP_CONFIG_LABEL);

        cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                Display.getDefault().getSystemColor(SWT.COLOR_RED));
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                cellStyle, DisplayMode.NORMAL, BLINK_DOWN_CONFIG_LABEL);
    }
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.