Package org.librebiz.pureport.context

Examples of org.librebiz.pureport.context.TextBuilder


public class Test2 extends javax.swing.JFrame {

    /** Creates new form Test2 */
    public Test2() {
        initComponents();
        TextBuilder builder = new TextBuilder();
        builder.setAttribute(
                TextAttribute.JUSTIFICATION, TextAttribute.JUSTIFICATION_FULL);
        builder.setAttribute(TextAttribute.FAMILY, "Verdana");
        builder.setAttribute(TextAttribute.SIZE, new Float(24));
        for (int i = 0; i < 20; ++i) {
            builder.append("Verdana ");
        }
        builder.setAttribute(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE);
        for (int i = 0; i < 20; ++i) {
            builder.append("Oblique ");
        }
        builder.setAttribute(TextAttribute.POSTURE, null);
        builder.setAttribute(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD);
        for (int i = 0; i < 20; ++i) {
            builder.append("Bold ");
        }
        builder.setAttribute(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE);
        for (int i = 0; i < 20; ++i) {
            builder.append("Bold&Oblique ");
        }
        builder.setAttribute(TextAttribute.BACKGROUND, Color.RED);
        builder.setAttribute(TextAttribute.FOREGROUND, Color.WHITE);
        for (int i = 0; i < 20; ++i) {
            builder.append("White-on-red ");
        }
        textView.setTextBuilder(builder);
    }
View Full Code Here


    public Block getBlock() {
        return (Block)box;
    }

    public void evaluate(ReportContext context, List<Forward> fwds) {
        content = new TextBuilder();
        getBlock().render(context, content, fwds);
    }
View Full Code Here

TOP

Related Classes of org.librebiz.pureport.context.TextBuilder

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.