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

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


        configRegistry.registerConfigAttribute(
                FilterRowConfigAttributes.TEXT_MATCHING_MODE,
                TextMatchingMode.REGULAR_EXPRESSION);

        ICellPainter cellPainter = new CellPainterDecorator(new TextPainter() {
            {
                this.paintFg = false;
            }

            // override the preferred width and height to be 0, as otherwise
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);
View Full Code Here

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

        ConfigRegistry configRegistry = (ConfigRegistry) getConfigRegistry();
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                new Style());
        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, new TextPainter());
    }
View Full Code Here

        ConfigRegistry configRegistry = (ConfigRegistry) getConfigRegistry();
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                new Style());
        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, new TextPainter());
    }
View Full Code Here

    public StyledRowHeaderConfiguration() {
        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

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

        AutoResizeColumnCommandFixture command = new AutoResizeColumnCommandFixture();
        GCFactory gcFactory = command.getGCFactory();
        IConfigRegistry registry = command.getConfigRegistry();
        GC gc = gcFactory.createGC();
        int col0MaxTextWidth = new TextPainter().getPreferredWidth(
                new CellFixture("Longest Text"), gc, registry);
        int col1MaxTextWidth = new TextPainter().getPreferredWidth(
                new CellFixture("Elephant"), gc, registry);
        gc.dispose();

        int[] maxColumnWidths = MaxCellBoundsHelper.getPreferredColumnWidths(
                registry, gcFactory, dataLayer, new int[] { 0, 1 });
View Full Code Here

        AutoResizeRowCommandFixture command = new AutoResizeRowCommandFixture();
        GCFactory gcFactory = command.getGCFactory();
        IConfigRegistry registry = command.getConfigRegistry();
        GC gc = gcFactory.createGC();
        int row0MaxTextHeight = new TextPainter().getPreferredHeight(
                new CellFixture(".."), gc, registry);
        int row1MaxTextHeight = new TextPainter().getPreferredHeight(
                new CellFixture("Elephant"), gc, registry);
        gc.dispose();

        int[] maxRowHeights = MaxCellBoundsHelper.getPreferredRowHeights(
                registry, gcFactory, dataLayer, new int[] { 0, 1 });
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.