Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfPTable


   * @throws DocumentException
   */
  private void addInformationChantier() throws DocumentException {
   
    //Title
    PdfPTable titleTable = new PdfPTable(1);
    titleTable.setWidthPercentage(100f);
    PdfPCell titleCell = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.title", null, localtion), contentBoldFont));
    titleCell.setBorder(Rectangle.NO_BORDER);
    titleCell.setHorizontalAlignment(PdfPTable.ALIGN_CENTER);
    titleTable.addCell(titleCell);
    addContent(titleTable);
    PdfPTable informationChantierTable = new PdfPTable(1);
    informationChantierTable.setWidthPercentage(100f);
    PdfPCell informationChantierCell;
    informationChantierTable.setWidthPercentage(100f);
    informationChantierCell = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.nomduchantier", null, localtion) + Constants.SPACE +
        (informationChantier.equals("null") ? "" : informationChantier), contentBoldFont));
    informationChantierCell.setColspan(1);
    informationChantierCell.setBorder(Rectangle.NO_BORDER);
    informationChantierTable.addCell(informationChantierCell);;
    addContent(informationChantierTable);
  }
View Full Code Here


    addContent(informationChantierTable);
  }
 
  private void addInformationProrata() throws DocumentException{
    //Title
    PdfPTable titleTable = new PdfPTable(1);
    titleTable.setWidthPercentage(100f);
    PdfPCell titleCell = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.synthesedesfichesst", null, localtion), contentBoldFont));
    titleCell.setBorder(Rectangle.NO_BORDER);
    titleCell.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
    titleTable.addCell(titleCell);
    addContent(titleTable);
   
    PdfPTable informationChantierTable = new PdfPTable(1);
    PdfPCell informationChantierCell;
    informationChantierTable.setWidthPercentage(100f);
    informationChantierCell = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.proratatheorique", null, localtion) + Constants.SPACE +
        (informationProrata.equals("null") ? "" : informationProrata), contentBoldFont));
    informationChantierCell.setBorder(Rectangle.NO_BORDER);
    informationChantierTable.addCell(informationChantierCell);
    addContent(informationChantierTable);
  }
View Full Code Here

    headerCell[40] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.manqueagagnerstsansprorata", null, localtion), contentBoldFont));
    for (PdfPCell pdfPCell : headerCell) {
      pdfPCell.setBackgroundColor(new Color(Constants.RED,Constants.GREEN,Constants.BLUE));
      pdfPCell.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);
    }
    PdfPTable headerTable = new PdfPTable(41);
    headerTable.setWidthPercentage(100f);
    headerTable.setWidths(wf);
    addCellsToTable(headerTable,headerCell);
    addContent(headerTable);
   
    //Content
    PdfPTable grid1Table = new PdfPTable(41);
    String tmp;
    for (int j = 0 ; j < grid1.size();j++) {
      grid1Table = new PdfPTable(41);
      String param = grid1.get(j);
      if(param != null && param.length() > 0){
        String arr[] = param.split(Constants.SEPRATE);
        for(int i=0;i < arr.length;i++){
          tmp = arr[i];
          grid1Table.addCell(new PdfPCell(new Phrase(tmp.equals("null") ? "" : tmp , contentNormalFont)));
        }
      }
      grid1Table.setWidthPercentage(100f);
      grid1Table.setWidths(wf);
      grid1Table.setSpacingAfter(3f);
      addContent(grid1Table);
      //Sum
      addSumGroupGrid1(totalRowGrid1.get(j),wf);     
    }
    addSumGrid1();
View Full Code Here

    }
    addSumGrid1();
  }
 
  private void addSumGroupGrid1(String sumGroup,float[] wf) throws DocumentException{
    PdfPTable table = new PdfPTable(41);
    PdfPCell cell ;//= new PdfPCell(new Phrase("Sous - Total du Marché /", contentBoldFont));
    if(sumGroup != null && sumGroup.length() > 0){
      String[] tmp = sumGroup.split(Constants.SEPRATE);
      for(int i=0;i<tmp.length;i++){
        cell = new PdfPCell(new Phrase(tmp[i].equals("null") ? "" : (tmp[i] + messageSource.getMessage("pdf.gestiondto.content.euro", null, localtion)), contentNormalFont));
        cell.setHorizontalAlignment(Rectangle.ALIGN_RIGHT);
        table.addCell(cell);
      }
     
    }
    table.setWidthPercentage(100f);
    table.setWidths(wf);
    table.setSpacingAfter(3f);
    addContent(table);
  }
View Full Code Here

        2.5f
        2.5f
        2.5f,
        2.5f
      };
    PdfPTable table = new PdfPTable(41);
    table.setWidthPercentage(100f);
    PdfPCell cell;
    if(sumTotalGrid1 != null && sumTotalGrid1.length() > 0){
      String[] tmp = sumTotalGrid1.split(Constants.SEPRATE);
      for(int i=0;i<tmp.length;i++){
        cell = new PdfPCell(new Phrase(tmp[i].equals("null") ? "" : (tmp[i] + messageSource.getMessage("pdf.gestiondto.content.euro", null, localtion)), contentNormalFont));
        cell.setHorizontalAlignment(Rectangle.ALIGN_RIGHT);
        table.addCell(cell);
      }
    }
    table.setWidths(wf);
    table.setWidthPercentage(100f);
    addContent(table);
  }
View Full Code Here

    headerCell[40] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.manqueagagnerstsansprorata", null, localtion), contentBoldFont));
    for (PdfPCell pdfPCell : headerCell) {
      pdfPCell.setBackgroundColor(new Color(Constants.RED,Constants.GREEN,Constants.BLUE));
      pdfPCell.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);
    }
    PdfPTable headerTable = new PdfPTable(41);
    headerTable.setWidthPercentage(100f);
    headerTable.setWidths(wf);
    addCellsToTable(headerTable,headerCell);
    addContent(headerTable);
   
    //Content
    PdfPTable grid2Table = new PdfPTable(41);
    String tmp;
    for (int j = 0 ; j < grid2.size();j++) {
      grid2Table = new PdfPTable(41);
      String param = grid2.get(j);
      if(param != null && param.length() > 0){
        String arr[] = param.split(Constants.SEPRATE);
        for(int i=0;i < arr.length;i++){
          tmp = arr[i];
          grid2Table.addCell(new PdfPCell(new Phrase(tmp.equals("null") ? "" : tmp , contentNormalFont)));
        }
      }
      grid2Table.setWidthPercentage(100f);
      grid2Table.setWidths(wf);
      grid2Table.setSpacingAfter(3f);
      addContent(grid2Table);
      //Sum
      addSumGroupGrid2(totalRowGrid2.get(j),wf);     
    }
    addSumGrid2();
View Full Code Here

    }
    addSumGrid2();
  }
 
  private void addSumGroupGrid2(String sumGroup,float[] wf) throws DocumentException{
    PdfPTable table = new PdfPTable(41);
    PdfPCell cell;
    if(sumGroup != null && sumGroup.length() > 0){
      String[] tmp = sumGroup.split(Constants.SEPRATE);
      for(int i=0 ;i<tmp.length;i++){
        cell = new PdfPCell(new Phrase(tmp[i].equals("null") ? "" : (tmp[i] + messageSource.getMessage("pdf.gestiondto.content.euro", null, localtion)), contentNormalFont));
        cell.setHorizontalAlignment(Rectangle.ALIGN_RIGHT);
        table.addCell(cell);
      }
    }
    table.setWidths(wf);
    table.setWidthPercentage(100f);
    table.setSpacingAfter(3f);
    addContent(table);
  }
View Full Code Here

        2.5f
        2.5f
        2.5f,
        2.5f
      };
    PdfPTable table = new PdfPTable(41);
    table.setWidthPercentage(100f);
    PdfPCell cell = new PdfPCell(new Phrase("HONORAIRES", contentNormalFont));
    table.addCell(cell);
    if(sumTotalGrid2 != null && sumTotalGrid2.length() > 0){
      String[] tmp = sumTotalGrid2.split(Constants.SEPRATE);
      for(int i=1;i<tmp.length;i++){
        cell = new PdfPCell(new Phrase(tmp[i].equals("null") ? "" : (tmp[i] + messageSource.getMessage("pdf.gestiondto.content.euro", null, localtion)), contentNormalFont));
        cell.setHorizontalAlignment(Rectangle.ALIGN_RIGHT);
        table.addCell(cell);
      }
    }
    table.setWidths(wf);
    table.setSpacingAfter(3f);
    addContent(table);
  }
View Full Code Here

    addContent(table);
  }
 
  private void addGrid3() throws DocumentException
    //Title
    PdfPTable titleTable = new PdfPTable(1);
    titleTable.setWidthPercentage(100f);
    PdfPCell titleCell = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.synthesedestranfpertpp", null, localtion), contentBoldFont));
    titleCell.setBorder(Rectangle.NO_BORDER);
    titleCell.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
    titleTable.addCell(titleCell);
    addContent(titleTable);
    //Header
    PdfPTable headerTable = new PdfPTable(7);
    headerTable.setWidthPercentage(100f);
    PdfPCell[] headerCell = new PdfPCell[7];
    headerCell[0] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.libelle", null, localtion), contentBoldFont));
    headerCell[1] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.objecif", null, localtion), contentBoldFont));
    headerCell[2] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.obj", null, localtion), contentBoldFont));
    headerCell[3] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.+-", null, localtion), contentBoldFont));
    headerCell[4] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.rd", null, localtion), contentBoldFont));
    headerCell[5] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ts", null, localtion), contentBoldFont));
    headerCell[6] = new PdfPCell(new Phrase("Total", contentBoldFont));
    for (PdfPCell pdfPCell : headerCell) {
      pdfPCell.setBackgroundColor(new Color(Constants.RED,Constants.GREEN,Constants.BLUE));
      pdfPCell.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);
    }
    addCellsToTable(headerTable, headerCell);
    addContent(headerTable);
   
    //Content
    PdfPTable grid3Table = new PdfPTable(7);
    grid3Table.setWidthPercentage(100f);
    String[] arrGrid3 = grid3.split(Constants.SEPRATE);
    String tmp;
    for (int i=0;i<arrGrid3.length;i++) {
      tmp = arrGrid3[i];
      grid3Table.addCell(new PdfPCell(new Phrase(tmp.equals("null") ? "" : tmp , contentNormalFont)));
      grid3Table.setWidthPercentage(100f);   
    }
    addContent(grid3Table);   
  }
View Full Code Here

    addContent(grid3Table);   
  }
 
  private void addSumGrid3() throws DocumentException{
    //Content
    PdfPTable sumGrid3Table = new PdfPTable(7);
    String[] arrSumGrid3 = sumGrid3.split(Constants.SEPRATE);
    String tmp;
    for (int i=0;i<arrSumGrid3.length;i++) {
      tmp = arrSumGrid3[i];
      sumGrid3Table.addCell(new PdfPCell(new Phrase((tmp.equals("null") ? "" : tmp) + messageSource.getMessage("pdf.gestiondto.content.euro", null, localtion), contentNormalFont)))
    }
    sumGrid3Table.setWidthPercentage(100f);
    addContent(sumGrid3Table)
  }
View Full Code Here

TOP

Related Classes of com.lowagie.text.pdf.PdfPTable

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.