Package com.lowagie.text

Examples of com.lowagie.text.Phrase


            setPadding(borderWidth / 2);
        }
        else {
            borderWidth = 0.5f;
            border = BOX;
            column.addText(this.phrase = new Phrase(new Chunk(image, 0, 0)));
            column.setLeading(0, 1);
            setPadding(0);
        }
    }
View Full Code Here


    tagHelper.startPageAnchor();
   
    ColumnText colText = new ColumnText(pdfContentByte);
    colText.setSimpleColumn(
      new Phrase(chunk),
      0,
      jasperPrint.getPageHeight(),
      1,
      1,
      0,
View Full Code Here

       
        ColumnText colText = new ColumnText(pdfContentByte);
        int upperY = jasperPrint.getPageHeight() - printImage.getY() - topPadding - getOffsetY() - yoffset;
        int lowerX = printImage.getX() + leftPadding + getOffsetX() + xoffset;
        colText.setSimpleColumn(
          new Phrase(chunk),
          lowerX,
          upperY - scaledHeight,
          lowerX + scaledWidth,
          upperY,
          scaledHeight,
View Full Code Here

  /**
   *
   */
  protected Phrase getPhrase(AttributedString as, String text, JRPrintText textElement)
  {
    Phrase phrase = new Phrase();
    int runLimit = 0;

    AttributedCharacterIterator iterator = as.getIterator();
    Locale locale = getTextLocale(textElement);
    
    boolean firstChunk = true;
    while(runLimit < text.length() && (runLimit = iterator.getRunLimit()) <= text.length())
    {
      Map attributes = iterator.getAttributes();
      Chunk chunk = getChunk(attributes, text.substring(iterator.getIndex(), runLimit), locale);
     
      if (firstChunk)
      {
        // only set anchor + bookmark for the first chunk in the text
        setAnchor(chunk, textElement, textElement);
      }
     
      JRPrintHyperlink hyperlink = textElement;
      if (hyperlink.getHyperlinkTypeValue() == HyperlinkTypeEnum.NONE)
      {
        hyperlink = (JRPrintHyperlink)attributes.get(JRTextAttribute.HYPERLINK);
      }
     
      setHyperlinkInfo(chunk, hyperlink);
      phrase.add(chunk);

      iterator.setIndex(runLimit);
      firstChunk = false;
    }

View Full Code Here

            cell1.setHorizontalAlignment( Element.ALIGN_LEFT );
            cell1.setBorder( 0 );

            head.addCell( cell1 );

            PdfPCell cell2 = new PdfPCell( new Phrase( currentDate,
                                                       DroolsDocsComponentFactory.HEADER_FOOTER_TEXT ) );
            cell2.setHorizontalAlignment( Element.ALIGN_RIGHT );
            cell2.setBorder( 0 );

            head.addCell( cell2 );
View Full Code Here

                                                        packageData );

            document.newPage();

            // List index of the rules           
            document.add( new Phrase( "Table of Contents" ) );
            document.add( DroolsDocsComponentFactory.createContents( packageData.getRules() ) );

            document.newPage();

            for ( DrlRuleParser ruleData : packageData.getRules() ) {
View Full Code Here

        return index;
    }

    private static Cell newHeaderCell(String text,
                                      Font font) throws BadElementException {
        Cell c = new Cell( new Phrase( text,
                                       font ) );
        c.setBackgroundColor( Color.decode( "#CCCCFF" ) );
        c.setLeading( 10 );
        c.setBorder( 1 );
View Full Code Here

        return c;
    }

    private static Cell newCell(String text) throws BadElementException {
        Cell c = new Cell( new Phrase( text,
                                       BODY_TEXT ) );
        c.setLeading( 10 );
        c.setBorder( 0 );
        c.setBorderWidthBottom( 1 );
View Full Code Here

        return c;
    }

    public static HeaderFooter createFooter(String packageName) {
        HeaderFooter footer = new HeaderFooter( new Phrase( packageName + "-",
                                                            HEADER_FOOTER_TEXT ),
                                                true );
        footer.setBorder( 1 );
        footer.setAlignment( Element.ALIGN_RIGHT );
View Full Code Here

    }
    return cell;
  }

  private PdfPCell getCell() {
    Phrase phrase = new Phrase(buffer.toString());
    phrase.getFont().setSize(7);
    PdfPCell cell = null;
    if (element==null){
      cell = new PdfPCell(phrase);
    } else {
      if (element instanceof Image) {
View Full Code Here

TOP

Related Classes of com.lowagie.text.Phrase

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.