Examples of PdfPTable


Examples of com.lowagie.text.pdf.PdfPTable

    }
    return grid3Table;
  }
 
  private PdfPTable addProcessCommantaire() throws DocumentException{
    PdfPTable commantaireTable = new PdfPTable(1);
    PdfPCell pdfPCell = new PdfPCell(new Phrase(commentaire.equals("null") ? "" : commentaire, contentNormalFont));
    pdfPCell.setBorder(Rectangle.NO_BORDER);
    commantaireTable.addCell(pdfPCell)
    float[] wf = {
        15
      };
    commantaireTable.setWidths(wf);
    commantaireTable.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
    return commantaireTable;
  }
View Full Code Here

Examples of com.lowagie.text.pdf.PdfPTable

  //End
 
  //Add Deduction Report
  private void addDeductionDto() throws DocumentException {

    PdfPTable headerTable = new PdfPTable(1);
    headerTable.setWidthPercentage(100f);
    //Add deduction
    PdfPTable deductionTable = addDeductionTable();
    addContent(deductionTable);
    //Add total deduction
    PdfPTable totalTable = addTotalDeduction();
    addContent(totalTable);
    lineBreak();
   
    PdfPCell leftCell,middleCell,rightCell;
    PdfPTable parent = new PdfPTable(3);
    parent.setSpacingBefore(0f);
    parent.setWidthPercentage(100f);
    float[] wfParent = {
        70//Libellé risque codification
        5,   //Origine de détection
        25
      };
    parent.setWidths(wfParent);

    //Add Penalties
    leftCell = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.titlebox.penalites", null, localtion),contentBoldFont));
    leftCell.setBorder(Rectangle.NO_BORDER);
    parent.addCell(leftCell);
   
    middleCell = new PdfPCell();
    middleCell.setBorder(Rectangle.NO_BORDER);
    parent.addCell(middleCell);
   
    rightCell = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.comment", null, localtion),contentBoldFont));
    rightCell.setBorder(Rectangle.NO_BORDER);
    parent.addCell(rightCell);
   
   
    PdfPTable penaltyTable = addPenaltiesTable();
    leftCell = new PdfPCell(penaltyTable);
    parent.addCell(leftCell);
   
    middleCell = new PdfPCell();
    middleCell.setBorder(Rectangle.NO_BORDER);
    parent.addCell(middleCell);
   
    PdfPTable commentairePdfPTable = addDeductionCommantaire();
    rightCell = new PdfPCell(commentairePdfPTable);
    parent.addCell(rightCell);
   
    leftCell = new PdfPCell(addAmountTable());
    parent.addCell(leftCell);
View Full Code Here

Examples of com.lowagie.text.pdf.PdfPTable

    for (PdfPCell pdfPCell : groupTitleCell) {
      pdfPCell.setBorder(Rectangle.NO_BORDER);
      pdfPCell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);
    }

    PdfPTable titleTable = new PdfPTable(1);
    titleTable.setWidthPercentage(100f);
    titleTable.setWidths(wfTitle);
    addCellsToTable(titleTable,groupTitleCell);
    addContent(titleTable);
   
    //Add Group Header
    PdfPCell[] groupHeaderCell = new PdfPCell[3];
    groupHeaderCell[0] = new PdfPCell();
    groupHeaderCell[0].setBorder(Rectangle.NO_BORDER);
    groupHeaderCell[1] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.quante", null, localtion), contentBoldFont));
    groupHeaderCell[1].setBackgroundColor(new Color(Constants.RED,Constants.GREEN,Constants.BLUE));

    groupHeaderCell[2] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.montant", null, localtion), contentBoldFont));
    groupHeaderCell[2].setBackgroundColor(new Color(Constants.RED,Constants.GREEN,Constants.BLUE));
   
    float[] wfGroupHeader = {
        10,
        70,
        20
      };
    for (PdfPCell pdfPCell : groupHeaderCell) {
      pdfPCell.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);
    }

    PdfPTable groupHeaderTable = new PdfPTable(3);
    groupHeaderTable.setWidthPercentage(100f);
    groupHeaderTable.setWidths(wfGroupHeader);
    addCellsToTable(groupHeaderTable,groupHeaderCell);
    addContent(groupHeaderTable);
   
   
    //create table header
    String[] arrPrestations = prestations.split(Constants.SEPRATE);
    PdfPCell[] deductionTableHeader = new PdfPCell[10];
    deductionTableHeader[0] = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.date",null,localtion), contentBoldFont));
    deductionTableHeader[1] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.canto",null,localtion) + arrPrestations[0], contentBoldFont));
    deductionTableHeader[2] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.badge",null,localtion) + arrPrestations[1], contentBoldFont));
    deductionTableHeader[3] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.grue",null,localtion) + arrPrestations[2], contentBoldFont))
    deductionTableHeader[4] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.lift",null,localtion) + arrPrestations[3], contentBoldFont));   
    deductionTableHeader[5] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.bene",null,localtion) + arrPrestations[4], contentBoldFont))
    deductionTableHeader[6] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.nettoyage",null,localtion) + arrPrestations[5], contentBoldFont));
    deductionTableHeader[7] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.autres",null,localtion), contentBoldFont));
    deductionTableHeader[8] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.prorata",null,localtion) + arrPrestations[6], contentBoldFont));
    deductionTableHeader[9] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.process.accomptes.refacturations",null,localtion), contentBoldFont));
   
    for (PdfPCell pdfPCell : deductionTableHeader) {
      pdfPCell.setBackgroundColor(new Color(Constants.RED,Constants.GREEN,Constants.BLUE));
      pdfPCell.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);
    }
    PdfPTable deductionTable = new PdfPTable(10);
   
    //Add Header
    addCellsToTable(deductionTable, deductionTableHeader);
   
    //Add Content
    if(deductions!=null && deductions.length() > 0){
      deductions = deductions.substring(0,deductions.length() - 1);
    }
    String[] tmp = deductions.split(Constants.SEPRATE);
    for(int i=0;i<tmp.length;i++){
      deductionTable.addCell(new PdfPCell(new Phrase(tmp[i], contentNormalFont)));
    }

    float[] wf = {
        10,
        10,
        10,
        10,
        10,
        10,
        10,
        10,
        10,
        10
      };
    deductionTable.setWidthPercentage(100f);
    deductionTable.setWidths(wf);

    return deductionTable;
  }
View Full Code Here

Examples of com.lowagie.text.pdf.PdfPTable

  }
 

  private PdfPTable addTotalDeduction() throws DocumentException {
   
    PdfPTable totalDeduction = new PdfPTable(10);
    String[] tmp = totaldeduction.split(Constants.SEPRATE);
    for(int i=0; i < tmp.length ; i++){
      if(i == 0){
        totalDeduction.addCell(new PdfPCell(new Phrase(messageSource.getMessage("FicheST.total", null, localtion), contentBoldFont)));
      }
      totalDeduction.addCell(new PdfPCell(new Phrase(tmp[i], contentBoldFont)));
    }
    float[] wf = {
        10,
        10,
        10,
        10
        10,
        10,
        10,
        10,
        10,
        10
      };
    totalDeduction.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
    totalDeduction.setWidths(wf);
    totalDeduction.setWidthPercentage(100f);

    return totalDeduction;
  }
View Full Code Here

Examples of com.lowagie.text.pdf.PdfPTable

   
    for (PdfPCell pdfPCell : grid3TableHeader) {
      pdfPCell.setBackgroundColor(new Color(Constants.RED,Constants.GREEN,Constants.BLUE));
      pdfPCell.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);
    }
    PdfPTable penlatyTable = new PdfPTable(3);
    addCellsToTable(penlatyTable, grid3TableHeader);
   
    //penaltys = penaltys.replace("?"," ");
    String[] tmp = penaltys.split(Constants.SEPRATE);
   
    for(int i=0; i < tmp.length ; i++){
      penlatyTable.addCell(new PdfPCell(new Phrase(tmp[i].equals("null") ? "" : tmp[i], contentNormalFont)));
   
    float[] wf = {
        15,
        15,
        15
      };
 
    penlatyTable.setWidths(wf);
    penlatyTable.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
    return penlatyTable;
  }
View Full Code Here

Examples of com.lowagie.text.pdf.PdfPTable

    return penlatyTable;
  }
 
  private PdfPTable addAmountTable() throws DocumentException {

    PdfPTable amountTable = new PdfPTable(3);
    PdfPCell amountCell;
    String[] tmp = amount.split(Constants.SEPRATE);
   
    for(int i=0; i < tmp.length ; i++){
      if(i == 0){
        amountCell = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.total", null, localtion), contentBoldFont));
        amountCell.setBackgroundColor(new Color(Constants.RED,Constants.GREEN,Constants.BLUE));
        amountTable.addCell(amountCell);
      }
      amountCell = new PdfPCell(new Phrase(tmp[i], contentNormalFont));
      amountCell.setBackgroundColor(new Color(Constants.RED,Constants.GREEN,Constants.BLUE));
      amountTable.addCell(amountCell);
     
      amountCell = new PdfPCell();
      amountCell.setBackgroundColor(new Color(Constants.RED,Constants.GREEN,Constants.BLUE));
      amountTable.addCell(amountCell);
   
    float[] wf = {
        15,
        15,
        15
      };
 
    amountTable.setWidths(wf);
    amountTable.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
    return amountTable;
  }
View Full Code Here

Examples of com.lowagie.text.pdf.PdfPTable

    commantaireTableHeader[0] = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.comment2", null,localtion)+" : ", contentBoldFont));
    for (PdfPCell pdfPCell : commantaireTableHeader) {
      pdfPCell.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);
    }
 
    PdfPTable commantaireTable = new PdfPTable(1);
    deductionComment1 = deductionComment1.equals("null") ? "" : deductionComment1;
    deductionComment2 = deductionComment2.equals("null") ? "" : deductionComment2;
    PdfPCell pdfPCell = new PdfPCell(new Phrase(deductionComment1 + "\n" + deductionComment2, contentNormalFont));
    pdfPCell.setBorder(Rectangle.NO_BORDER);
    commantaireTable.addCell(pdfPCell)
    float[] wf = {
        15
      };
    commantaireTable.setWidths(wf);
    commantaireTable.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
    return commantaireTable;
  }
View Full Code Here

Examples of com.lowagie.text.pdf.PdfPTable

    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, contentBoldFont));
    informationChantierCell.setBorder(Rectangle.NO_BORDER);
    informationChantierTable.addCell(informationChantierCell);
    addContent(informationChantierTable);
  }
View Full Code Here

Examples of com.lowagie.text.pdf.PdfPTable

    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

Examples of com.lowagie.text.pdf.PdfPTable

    }
    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
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.