Package org.eclipse.nebula.widgets.nattable.painter.cell

Examples of org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter


        font = GUIHelper.getFont(new FontData("Verdana", 8, SWT.NORMAL));

        Image bgImage = new Image(Display.getDefault(), getClass()
                .getResourceAsStream("row_header_bg.png"));
        TextPainter txtPainter = new TextPainter(false, false);
        ICellPainter bgImagePainter = new BackgroundImagePainter(txtPainter,
                bgImage, null);
        cellPainter = bgImagePainter;
    }
View Full Code Here


                                .getResourceAsStream(
                                        "/org/eclipse/nebula/widgets/nattable/examples/resources/hovered_column_header_bg.png"));

                TextPainter txtPainter = new TextPainter(false, false);

                ICellPainter bgImagePainter = new BackgroundImagePainter(
                        txtPainter, bgImage, GUIHelper.getColor(192, 192, 192));

                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_PAINTER, bgImagePainter,
                        DisplayMode.NORMAL, GridRegion.COLUMN_HEADER);
                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_PAINTER, bgImagePainter,
                        DisplayMode.NORMAL, GridRegion.CORNER);

                ICellPainter hoveredHeaderPainter = new BackgroundImagePainter(
                        txtPainter, hoverBgImage, GUIHelper.getColor(192, 192,
                                192));

                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_PAINTER,
View Full Code Here

            // register body cell style for every display mode
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, defaultStyle);
        }

        ICellPainter defaultPainter = getDefaultCellPainter();
        if (defaultPainter != null) {
            // register body cell painter for every display mode
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, defaultPainter);
        }
View Full Code Here

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, columnHeaderStyle,
                    DisplayMode.NORMAL, GridRegion.COLUMN_HEADER);
        }

        ICellPainter columnHeaderCellPainter = getColumnHeaderCellPainter();
        if (columnHeaderCellPainter != null) {
            // register column header cell painter in normal mode
            // will also be used in other modes if no other cell painter is
            // registered explicitly
            configRegistry.registerConfigAttribute(
View Full Code Here

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, rowHeaderStyle,
                    DisplayMode.NORMAL, GridRegion.ROW_HEADER);
        }

        ICellPainter rowHeaderCellPainter = getRowHeaderCellPainter();
        if (rowHeaderCellPainter != null) {
            // register row header cell painter in normal mode
            // will also be used in other modes if no other cell painter is
            // registered explicitly
            configRegistry.registerConfigAttribute(
View Full Code Here

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, cornerStyle,
                    DisplayMode.NORMAL, GridRegion.CORNER);
        }

        ICellPainter cornerCellPainter = this.styleCornerLikeColumnHeader ? getColumnHeaderCellPainter()
                : getCornerCellPainter();
        if (cornerCellPainter != null) {
            // register corner cell painter in normal mode
            // will also be used in other modes if no other cell painter is
            // registered explicitly
View Full Code Here

        if (!isStyleEmpty(defaultHoverStyle)) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, defaultHoverStyle,
                    DisplayMode.HOVER);
        }
        ICellPainter defaultHoverCellPainter = getDefaultHoverCellPainter();
        if (defaultHoverCellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, defaultHoverCellPainter,
                    DisplayMode.HOVER);
        }

        IStyle bodyHoverStyle = getBodyHoverStyle();
        if (!isStyleEmpty(bodyHoverStyle)) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, bodyHoverStyle,
                    DisplayMode.HOVER, GridRegion.BODY);
        }
        ICellPainter bodyHoverCellPainter = getBodyHoverCellPainter();
        if (bodyHoverCellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, bodyHoverCellPainter,
                    DisplayMode.HOVER, GridRegion.BODY);
        }

        IStyle columnHeaderHoverStyle = getColumnHeaderHoverStyle();
        if (!isStyleEmpty(columnHeaderHoverStyle)) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, columnHeaderHoverStyle,
                    DisplayMode.HOVER, GridRegion.COLUMN_HEADER);
        }
        ICellPainter columnHeaderHoverCellPainter = getColumnHeaderHoverCellPainter();
        if (columnHeaderHoverCellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
                    columnHeaderHoverCellPainter, DisplayMode.HOVER,
                    GridRegion.COLUMN_HEADER);
        }

        IStyle rowHeaderHoverStyle = getRowHeaderHoverStyle();
        if (!isStyleEmpty(rowHeaderHoverStyle)) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, rowHeaderHoverStyle,
                    DisplayMode.HOVER, GridRegion.ROW_HEADER);
        }
        ICellPainter rowHeaderHoverCellPainter = getRowHeaderHoverCellPainter();
        if (rowHeaderHoverCellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
                    rowHeaderHoverCellPainter, DisplayMode.HOVER,
                    GridRegion.ROW_HEADER);
View Full Code Here

        if (!isStyleEmpty(defaultHoverStyle)) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, defaultHoverStyle,
                    DisplayMode.SELECT_HOVER);
        }
        ICellPainter defaultHoverCellPainter = getDefaultHoverSelectionCellPainter();
        if (defaultHoverCellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, defaultHoverCellPainter,
                    DisplayMode.SELECT_HOVER);
        }

        IStyle bodyHoverStyle = getBodyHoverSelectionStyle();
        if (!isStyleEmpty(bodyHoverStyle)) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, bodyHoverStyle,
                    DisplayMode.SELECT_HOVER, GridRegion.BODY);
        }
        ICellPainter bodyHoverCellPainter = getBodyHoverSelectionCellPainter();
        if (bodyHoverCellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, bodyHoverCellPainter,
                    DisplayMode.SELECT_HOVER, GridRegion.BODY);
        }

        IStyle columnHeaderHoverStyle = getColumnHeaderHoverSelectionStyle();
        if (!isStyleEmpty(columnHeaderHoverStyle)) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, columnHeaderHoverStyle,
                    DisplayMode.SELECT_HOVER, GridRegion.COLUMN_HEADER);
        }
        ICellPainter columnHeaderHoverCellPainter = getColumnHeaderHoverSelectionCellPainter();
        if (columnHeaderHoverCellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
                    columnHeaderHoverCellPainter, DisplayMode.SELECT_HOVER,
                    GridRegion.COLUMN_HEADER);
        }

        IStyle rowHeaderHoverStyle = getRowHeaderHoverSelectionStyle();
        if (!isStyleEmpty(rowHeaderHoverStyle)) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, rowHeaderHoverStyle,
                    DisplayMode.SELECT_HOVER, GridRegion.ROW_HEADER);
        }
        ICellPainter rowHeaderHoverCellPainter = getRowHeaderHoverSelectionCellPainter();
        if (rowHeaderHoverCellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
                    rowHeaderHoverCellPainter, DisplayMode.SELECT_HOVER,
                    GridRegion.ROW_HEADER);
View Full Code Here

                    CellConfigAttributes.CELL_STYLE, defaultSelectionStyle,
                    DisplayMode.SELECT);
        }

        // register body cell painter for every display mode
        ICellPainter defaultSelectionCellPainter = getDefaultSelectionCellPainter();
        if (defaultSelectionCellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
                    defaultSelectionCellPainter, DisplayMode.SELECT);
        }
View Full Code Here

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, columnHeaderStyle,
                    DisplayMode.SELECT, GridRegion.COLUMN_HEADER);
        }

        ICellPainter columnHeaderCellPainter = getColumnHeaderSelectionCellPainter();
        if (columnHeaderCellPainter != null) {
            // register column header cell painter in select mode
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, columnHeaderCellPainter,
                    DisplayMode.SELECT, GridRegion.COLUMN_HEADER);
        }

        IStyle fullSelectionColumnHeaderStyle = getColumnHeaderFullSelectionStyle();
        if (!isStyleEmpty(fullSelectionColumnHeaderStyle)) {
            // register column header cell style in select mode when all cells
            // in the column are selected
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE,
                    fullSelectionColumnHeaderStyle, DisplayMode.SELECT,
                    SelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE);
        }

        ICellPainter fullSelectionColumnHeaderCellPainter = getColumnHeaderFullSelectionCellPainter();
        if (fullSelectionColumnHeaderCellPainter != null) {
            // register column header cell painter in select mode when all cells
            // in the column are selected
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter

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.