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

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


        return this.defaultHoverCellPainter;
    }

    @Override
    protected IStyle getBodyHoverStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                bodyHoverBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                bodyHoverFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                bodyHoverGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                bodyHoverGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                bodyHoverHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                bodyHoverVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT, bodyHoverFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE, bodyHoverImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                bodyHoverBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                bodyHoverPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                bodyHoverTextDecoration);
        return cellStyle;
    }
View Full Code Here


        return this.bodyHoverCellPainter;
    }

    @Override
    protected IStyle getColumnHeaderHoverStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                cHeaderHoverBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                cHeaderHoverFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                cHeaderHoverGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                cHeaderHoverGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                cHeaderHoverHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                cHeaderHoverVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT, cHeaderHoverFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                cHeaderHoverImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                cHeaderHoverBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                cHeaderHoverPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                cHeaderHoverTextDecoration);
        return cellStyle;
    }
View Full Code Here

        return this.cHeaderHoverCellPainter;
    }

    @Override
    protected IStyle getRowHeaderHoverStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                rHeaderHoverBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                rHeaderHoverFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                rHeaderHoverGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                rHeaderHoverGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                rHeaderHoverHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                rHeaderHoverVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT, rHeaderHoverFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                rHeaderHoverImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                rHeaderHoverBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                rHeaderHoverPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                rHeaderHoverTextDecoration);
        return cellStyle;
    }
View Full Code Here

        return this.rHeaderHoverCellPainter;
    }

    @Override
    protected IStyle getDefaultHoverSelectionStyle() {
        IStyle cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                defaultHoverSelectionBgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                defaultHoverSelectionFgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_BACKGROUND_COLOR,
                defaultHoverSelectionGradientBgColor);
        cellStyle.setAttributeValue(
                CellStyleAttributes.GRADIENT_FOREGROUND_COLOR,
                defaultHoverSelectionGradientFgColor);
        cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT,
                defaultHoverSelectionHAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT,
                defaultHoverSelectionVAlign);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT,
                defaultHoverSelectionFont);
        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                defaultHoverSelectionImage);
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                defaultHoverSelectionBorderStyle);
        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                defaultHoverSelectionPWEchoChar);
        cellStyle.setAttributeValue(CellStyleAttributes.TEXT_DECORATION,
                defaultHoverSelectionTextDecoration);
        return cellStyle;
    }
View Full Code Here

        configureOddRowStyle(configRegistry);
        configureEvenRowStyle(configRegistry);
    }

    protected void configureOddRowStyle(IConfigRegistry configRegistry) {
        Style cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                oddRowBgColor);
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                cellStyle, DisplayMode.NORMAL,
                AlternatingRowConfigLabelAccumulator.EVEN_ROW_CONFIG_TYPE);
    }
View Full Code Here

                cellStyle, DisplayMode.NORMAL,
                AlternatingRowConfigLabelAccumulator.EVEN_ROW_CONFIG_TYPE);
    }

    protected void configureEvenRowStyle(IConfigRegistry configRegistry) {
        Style cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                evenRowBgColor);
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                cellStyle, DisplayMode.NORMAL,
                AlternatingRowConfigLabelAccumulator.ODD_ROW_CONFIG_TYPE);
    }
View Full Code Here

        selectedHeaderBgColor = tableStyle.headerSelectionBgColor;
        selectedHeaderFgColor = tableStyle.headerSelectionFgColor;
        selectedHeaderFont = tableStyle.headerSelectionFont;

        // Even/row row sensitive selection style
        evenRowStyle = new Style();
        evenRowStyle.setAttributeValue(BACKGROUND_COLOR,
                tableStyle.evenRowCellSelectionBgColor);
        evenRowStyle.setAttributeValue(FOREGROUND_COLOR,
                tableStyle.evenRowCellSelectionFgColor);
        evenRowStyle.setAttributeValue(FONT, tableStyle.cellSelectionFont);

        oddRowStyle = new Style();
        oddRowStyle.setAttributeValue(BACKGROUND_COLOR,
                tableStyle.oddRowCellSelectionBgColor);
        oddRowStyle.setAttributeValue(FOREGROUND_COLOR,
                tableStyle.oddRowCellSelectionFgColor);
        oddRowStyle.setAttributeValue(FONT, tableStyle.cellSelectionFont);
View Full Code Here

    }

    @Override
    protected void configureHeaderFullySelectedStyle(
            IConfigRegistry configRegistry) {
        Style fullySelectedStyle = new Style();
        fullySelectedStyle.setAttributeValue(BACKGROUND_COLOR,
                tableStyle.fullySelectedHeaderBgColor);
        fullySelectedStyle.setAttributeValue(FOREGROUND_COLOR,
                tableStyle.fullySelectedHeaderFgColor);
        fullySelectedStyle.setAttributeValue(FONT,
                tableStyle.fullySelectedHeaderFont);

        configRegistry.registerConfigAttribute(CELL_STYLE, fullySelectedStyle,
                SELECT, SelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE);
        configRegistry.registerConfigAttribute(CELL_STYLE, fullySelectedStyle,
View Full Code Here

                CellConfigAttributes.CELL_PAINTER, sortHeaderPainter,
                DisplayMode.SELECT, GridRegion.COLUMN_HEADER);
    }

    private void addNormalModeStyling(IConfigRegistry configRegistry) {
        Style cellStyle = new Style();
        cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                tableStyle.columnHeaderBGColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                tableStyle.columnHeaderFGColor);
        cellStyle.setAttributeValue(CellStyleAttributes.FONT,
                tableStyle.columnHeaderFont);

        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                cellStyle, DisplayMode.NORMAL, GridRegion.COLUMN_HEADER);
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
View Full Code Here

        verticalAlignmentPicker.setSelectedAlignment(origVAlign);
    }

    @Override
    public Style getNewValue() {
        Style newStyle = new Style();

        Color bgColor = backgroundColorPicker.getSelectedColor();
        newStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
                bgColor);

        Color fgColor = foregroundColorPicker.getSelectedColor();
        newStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
                fgColor);

        Font font = fontPicker.getSelectedFont();
        newStyle.setAttributeValue(CellStyleAttributes.FONT, font);

        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

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.