Examples of TextPainter


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

                    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

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

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

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

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

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

    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

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

                        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

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

        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

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

        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

Examples of org.geomajas.gwt.client.gfx.painter.TextPainter

    graphics.setFallbackController(new PanController(this));

    // Painter registration:
    painterVisitor.registerPainter(new CirclePainter());
    painterVisitor.registerPainter(new RectanglePainter());
    painterVisitor.registerPainter(new TextPainter());
    painterVisitor.registerPainter(new GeometryPainter());
    painterVisitor.registerPainter(new ImagePainter());
    painterVisitor.registerPainter(new MapModelPainter(this));
    painterVisitor.registerPainter(new RasterLayerPainter(this));
    painterVisitor.registerPainter(new RasterTilePainter());
View Full Code Here

Examples of org.jdesktop.swingx.painter.TextPainter

   
    private MutableTreeNode createTextPainterDemos() {
        DefaultMutableTreeNode node = createInfoNode("Text Painter Demos", null);
        Font font = new Font("SansSerif", Font.BOLD, 80);
       
        TextPainter tp = new TextPainter("Neon", font, Color.RED);
        node.add(createInfoNode("Text", tp));
       
        tp = new TextPainter("Neon",font,Color.BLACK);
        tp.setFillPaint(PaintUtils.AERITH);
        node.add(createInfoNode("Text with gradient", tp));
       
        return node;
    }
View Full Code Here

Examples of org.jdesktop.swingx.painter.TextPainter

    //TODO some transforms moving painter outside of visible region
    private MutableTreeNode createTransformPainterDemos() {
        DefaultMutableTreeNode node = createInfoNode("Compound Painter Transform Demos", null);
        Font font = new Font("SansSerif", Font.BOLD, 80);
       
        TextPainter tp = new TextPainter("Text", font);
        CompoundPainter<Object> cp = new CompoundPainter<Object>(tp);
        node.add(createInfoNode("Normal Text", cp));
       
        tp = new TextPainter("Text", font);
        cp = new CompoundPainter<Object>(tp);
        cp.setTransform(AffineTransform.getRotateInstance(-Math.PI * 2 / 8, 100, 100));
        node.add(createInfoNode("Rotated Text", cp));
       
        tp = new TextPainter("Text", font);
        cp = new CompoundPainter<Object>(tp);
        cp.setTransform(AffineTransform.getShearInstance(-0.2, 0));
        node.add(createInfoNode("Sheared Text", cp));
       
        tp = new TextPainter("Text", font);
        cp = new CompoundPainter<Object>(tp);
        cp.setTransform(AffineTransform.getScaleInstance(2, 2));
        node.add(createInfoNode("Scaled Text", cp));
       
        RectanglePainter rp = new RectanglePainter(30, 30, 30, 30, 30, 30,
                true, Color.RED, 4f, Color.RED.darker());
        tp = new TextPainter("Text", font);
        cp = new CompoundPainter<Object>(rp, tp);
        cp.setTransform(AffineTransform.getRotateInstance(-Math.PI * 2 / 8, 100, 100));
        node.add(createInfoNode("Rotated Text w/ effects on rect", cp));
       
        return node;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.