Package com.lowagie.text

Examples of com.lowagie.text.LwgPhrase


     * @param headerFooter The HeaderFooter to base this RtfHeaderFooter on
     * @param type The type of RtfHeaderFooter
     * @param displayAt The display location of this RtfHeaderFooter
     */
    protected RtfHeaderFooter(RtfDocument doc, HeaderFooter headerFooter, int type, int displayAt) {
        super(new LwgPhrase(""), false);
        this.document = doc;
        this.type = type;
        this.displayAt = displayAt;
        Paragraph par = new Paragraph();
        par.setAlignment(headerFooter.alignment());
View Full Code Here


     * @param doc The RtfDocument this RtfHeaderFooter belongs to
     * @param headerFooter The RtfHeaderFooter to copy
     * @param displayAt The display location of this RtfHeaderFooter
     */
    protected RtfHeaderFooter(RtfDocument doc, RtfHeaderFooter headerFooter, int displayAt) {
        super(new LwgPhrase(""), false);
        this.document = doc;
        this.content = headerFooter.getContent();
        this.displayAt = displayAt;
        for(int i = 0; i < this.content.length; i++) {
            if(this.content[i] instanceof LwgElement) {
View Full Code Here

    
     * @param doc The RtfDocument this RtfHeaderFooter belongs to
     * @param headerFooter The HeaderFooter to base this RtfHeaderFooter on
     */
    protected RtfHeaderFooter(RtfDocument doc, HeaderFooter headerFooter) {
        super(new LwgPhrase(""), false);
        this.document = doc;
        Paragraph par = new Paragraph();
        par.setAlignment(headerFooter.alignment());
        if (headerFooter.getBefore() != null) {
            par.add(headerFooter.getBefore());
View Full Code Here

     * Constructs a RtfHeaderFooter for an array of Elements.
     *
     * @param elements The Elements to display as the content of this RtfHeaderFooter.
     */
    public RtfHeaderFooter(LwgElement[] elements) {
        super(new LwgPhrase(""), false);
        this.content = new Object[elements.length];
        for(int i = 0; i < elements.length; i++) {
            this.content[i] = elements[i];
        }
    }
View Full Code Here

            table.getDefaultCell().setBorder(LwgRectangle.NO_BORDER);
            for (int k = 0; k < 500 * 4; ++k) {
                if (k == 0) {
                    table.getDefaultCell().setColspan(4);
                    table.getDefaultCell().setHorizontalAlignment(LwgElement.ALIGN_CENTER);
                    table.add(new LwgPhrase("This is an URL", new LwgFont(bf, fontSize * 2)));
                    table.getDefaultCell().setColspan(1);
                    table.getDefaultCell().setHorizontalAlignment(LwgElement.ALIGN_LEFT);
                    k += 3;
                }
                else
                    table.add(new LwgPhrase(String.valueOf(k), new LwgFont(bf, fontSize)));
            }
            table.setTableEvent(event);
            table.setHeaderRows(3);
            document.add(table);
        }
View Full Code Here

          new GfrFileOutputStream("com.lowagie.examples.fonts.styles.FontStylePropagation.pdf"));

      // step 3: we open the document
      document.open();
      // step 4:
      LwgPhrase myPhrase = new LwgPhrase("Hello 1! ", new LwgFont(LwgFont.TIMES_ROMAN, 8, LwgFont.BOLD));
            myPhrase.add(new LwgPhrase("some other font ", new LwgFont(LwgFont.HELVETICA, 8)));
            myPhrase.add(new LwgPhrase("This is the end of the sentence.\n", new LwgFont(LwgFont.TIMES_ROMAN, 8, LwgFont.ITALIC)));
            document.add(myPhrase);
           
            myPhrase = new LwgPhrase(12);
            myPhrase.add(new LwgPhrase("Hello 2! ", new LwgFont(LwgFont.TIMES_ROMAN, 8, LwgFont.BOLD)));
            myPhrase.add(new LwgPhrase("This is the end of the sentence.\n", new LwgFont(LwgFont.TIMES_ROMAN, 8, LwgFont.ITALIC)));
            document.add(myPhrase);
           
            myPhrase = new LwgPhrase("Hello 3! ", FontFactory.getFont(FontFactory.TIMES_ROMAN, 8, LwgFont.BOLD));
            myPhrase.add(new LwgPhrase("some other font ", FontFactory.getFont(FontFactory.HELVETICA, 8)));
            myPhrase.add(new LwgPhrase("This is the end of the sentence.\n", FontFactory.getFont(FontFactory.TIMES_ROMAN, 8, LwgFont.ITALIC)));
            document.add(myPhrase);
           
            Paragraph myParagraph = new Paragraph("Hello 1bis! ", new LwgFont(LwgFont.TIMES_ROMAN, 8, LwgFont.BOLD));
            myParagraph.add(new Paragraph("This is the end of the sentence.", new LwgFont(LwgFont.TIMES_ROMAN, 8, LwgFont.ITALIC)));
            document.add(myParagraph);
View Full Code Here

            datatable.setWidths(headerwidths);
            datatable.setWidth(100);
            datatable.setPadding(3);
           
            // the first cell spans 10 columns
            LwgCell cell = new LwgCell(new LwgPhrase("Administration -System Users Report", FontFactory.getFont(FontFactory.HELVETICA, 24, LwgFont.BOLD)));
            cell.setHorizontalAlignment(LwgElement.ALIGN_CENTER);
            cell.setLeading(30);
            cell.setColspan(10);
            cell.setBorder(LwgRectangle.NO_BORDER);
            cell.setBackgroundColor(new Color(0xC0, 0xC0, 0xC0));
View Full Code Here

            String atext = "\u062a\u0635\u0628\u062d ";
            LwgPdfPTable table = new LwgPdfPTable(5);
            table.setWidthPercentage(100);
            table.setRunDirection(PdfWriter.RUN_DIRECTION_NO_BIDI);
            for (int k = 0; k < 5; ++k) {
                LwgPdfPCell cell = new LwgPdfPCell(new LwgPhrase(10, atext + k, f2));
                if (k == 2) {
                    cell.setColspan(2);
                    ++k;
                }
                table.add(cell);
            }
            table.setRunDirection(PdfWriter.RUN_DIRECTION_LTR);
            for (int k = 0; k < 5; ++k) {
                LwgPdfPCell cell = new LwgPdfPCell(new LwgPhrase(10, atext + k, f2));
                if (k == 2) {
                    cell.setColspan(2);
                    ++k;
                }
                table.add(cell);
            }
            table.setRunDirection(PdfWriter.RUN_DIRECTION_RTL);
            for (int k = 0; k < 5; ++k) {
                LwgPdfPCell cell = new LwgPdfPCell(new LwgPhrase(10, atext + k, f2));
                if (k == 2) {
                    cell.setColspan(2);
                    ++k;
                }
                table.add(cell);
View Full Code Here

TOP

Related Classes of com.lowagie.text.LwgPhrase

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.