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

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


                            .getResourceAsStream(
                                    "/org/eclipse/nebula/widgets/nattable/examples/resources/selected_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 selectedHeaderPainter = new BackgroundImagePainter(
                    txtPainter, selectedBgImage, GUIHelper.getColor(192, 192,
                            192));

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


    public void configureRegistry(IConfigRegistry configRegistry) {
        Image bgImage = tableModel.tableStyle.columnHeaderBgImage;

        if (ObjectUtils.isNotNull(bgImage)) {
            TextPainter txtPainter = new TextPainter(false, false);
            ICellPainter cellPainter = new BackgroundImagePainter(txtPainter,
                    bgImage, GUIHelper.getColor(192, 192, 192));

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
                    new ColumnGroupHeaderTextPainter(columnGroupModel,
View Full Code Here

        Image selectedBgImage = tableStyle.columnHeaderSelectedBgImage;
        ICellPainter sortHeaderPainter;

        if (ObjectUtils.isNotNull(selectedBgImage)) {
            TextPainter txtPainter = new TextPainter(false, false);
            ICellPainter selectedCellPainter = new BackgroundImagePainter(
                    txtPainter, selectedBgImage, GUIHelper.getColor(192, 192,
                            192));
            sortHeaderPainter = new SortableHeaderTextPainter(
                    selectedCellPainter, false, false);
        } else {
View Full Code Here

        // Gradient painter
        Image bgImage = tableStyle.columnHeaderBgImage;

        if (ObjectUtils.isNotNull(bgImage)) {
            TextPainter txtPainter = new TextPainter(false, false);
            ICellPainter cellPainter = new BackgroundImagePainter(txtPainter,
                    bgImage, GUIHelper.getColor(192, 192, 192));
            SortableHeaderTextPainter sortHeaderPainter = new SortableHeaderTextPainter(
                    cellPainter, false, false);

            configRegistry.registerConfigAttribute(
View Full Code Here

                                .getResourceAsStream(
                                        "/org/eclipse/nebula/widgets/nattable/examples/resources/selected_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,
                        hoveredHeaderPainter, DisplayMode.HOVER,
                        GridRegion.COLUMN_HEADER);

                ICellPainter selectedHeaderPainter = new BackgroundImagePainter(
                        txtPainter, selectedBgImage, GUIHelper.getColor(192,
                                192, 192));

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

    private void addSelectedModeStyling(IConfigRegistry configRegistry) {
        Image selectedBgImage = new Image(Display.getDefault(), getClass()
                .getResourceAsStream("selected_column_header_bg.png"));

        TextPainter txtPainter = new TextPainter(false, false);
        ICellPainter selectedCellPainter = new BackgroundImagePainter(
                txtPainter, selectedBgImage, GUIHelper.getColor(192, 192, 192));
        // If sorting is enables we still want the sort icon to be drawn.
        SortableHeaderTextPainter selectedHeaderPainter = new SortableHeaderTextPainter(
                selectedCellPainter, false, true);
View Full Code Here

    private void addNormalModeStyling(IConfigRegistry configRegistry) {
        Image bgImage = new Image(Display.getDefault(), getClass()
                .getResourceAsStream("column_header_bg.png"));

        TextPainter txtPainter = new TextPainter(false, false);
        ICellPainter bgImagePainter = new BackgroundImagePainter(txtPainter,
                bgImage, GUIHelper.getColor(192, 192, 192));
        SortableHeaderTextPainter headerPainter = new SortableHeaderTextPainter(
                bgImagePainter, false, true);

        configRegistry.registerConfigAttribute(
View Full Code Here

                            .getResourceAsStream(
                                    "/org/eclipse/nebula/widgets/nattable/examples/resources/selected_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, hoveredHeaderPainter,
                    DisplayMode.HOVER, GridRegion.COLUMN_HEADER);

            ICellPainter selectedHeaderPainter = new BackgroundImagePainter(
                    txtPainter, selectedBgImage, GUIHelper.getColor(192, 192,
                            192));

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, selectedHeaderPainter,
                    DisplayMode.SELECT, GridRegion.COLUMN_HEADER);

            ICellPainter selectedHoveredHeaderPainter = new BackgroundImagePainter(
                    txtPainter, selectedHoveredBgImage, GUIHelper.getColor(192,
                            192, 192));

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

        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

TOP

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

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.