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

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


                columnLabelAccumulator, dataProvider));

        final ColumnHeaderCheckBoxPainter columnHeaderCheckBoxPainter = new ColumnHeaderCheckBoxPainter(
                bodyDataLayer);
        final ICellPainter column9HeaderPainter = new BeveledBorderDecorator(
                new CellPainterDecorator(new TextPainter(), CellEdgeEnum.RIGHT,
                        columnHeaderCheckBoxPainter));
        natTable.addConfiguration(new AbstractRegistryConfiguration() {
            @Override
            public void configureRegistry(IConfigRegistry configRegistry) {
                configRegistry.registerConfigAttribute(
View Full Code Here


                    Display.getDefault(),
                    getClass()
                            .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(
View Full Code Here

                    CellConfigAttributes.CELL_STYLE, style, DisplayMode.NORMAL,
                    _4222_CellPainterExample.COLUMN_FOUR_LABEL);

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
                    new GradientBackgroundPainter(new TextPainter(false, false,
                            false, true), true), DisplayMode.NORMAL,
                    _4222_CellPainterExample.COLUMN_FOUR_LABEL);
        }
View Full Code Here

            // know where to render a border
            // within the cell
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
                    new CustomLineBorderDecorator(new PaddingDecorator(
                            new TextPainter(), 0, 5, 0, 0), new BorderStyle(2,
                            GUIHelper.COLOR_GREEN, LineStyleEnum.SOLID)),
                    DisplayMode.NORMAL,
                    _4222_CellPainterExample.COLUMN_SIX_LABEL);

            // don't forget to register the Double converter!
View Full Code Here

     * Creates the default {@link SortableHeaderTextPainter} that uses a
     * {@link TextPainter} as base {@link ICellPainter} and decorate it with the
     * {@link SortIconPainter} on the right edge of the cell.
     */
    public SortableHeaderTextPainter() {
        this(new TextPainter());
    }
View Full Code Here

    @Override
    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,
View Full Code Here

    private void addSelectedModeStyling(IConfigRegistry configRegistry) {
        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 {
            sortHeaderPainter = new SortableHeaderTextPainter(
                    new BeveledBorderDecorator(new TextPainter()), false, false);
        }

        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, sortHeaderPainter,
                DisplayMode.SELECT, GridRegion.COLUMN_HEADER);
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(
                    CellConfigAttributes.CELL_PAINTER, sortHeaderPainter,
                    DisplayMode.NORMAL, GridRegion.COLUMN_HEADER);
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, sortHeaderPainter,
                    DisplayMode.NORMAL, GridRegion.CORNER);
        } else {
            SortableHeaderTextPainter sortHeaderPainter = new SortableHeaderTextPainter(
                    new BeveledBorderDecorator(new TextPainter()), false, false);
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, sortHeaderPainter,
                    DisplayMode.NORMAL, GridRegion.COLUMN_HEADER);
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, sortHeaderPainter,
View Full Code Here

                        Display.getDefault(),
                        getClass()
                                .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(
View Full Code Here

     *            The {@link ImagePainter} that should be used to paint the icon
     *            in the filter row cells.
     */
    public FilterRowPainter(ImagePainter filterIconPainter) {
        this.filterIconPainter = filterIconPainter;
        setWrappedPainter(new CellPainterDecorator(new TextPainter(),
                CellEdgeEnum.RIGHT, filterIconPainter));
    }
View Full Code Here

TOP

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

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.