Package com.lowagie.text

Examples of com.lowagie.text.Phrase


    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);
View Full Code Here


        2.5f
      };
   
    //Header
    PdfPCell[] headerCell = new PdfPCell[41];
    headerCell[0] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.lot", 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.societe", null, localtion), contentBoldFont));
    headerCell[3] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.obj", null, localtion), contentBoldFont));
    headerCell[4] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.+-", null, localtion), contentBoldFont));
    headerCell[5] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.rd", null, localtion), contentBoldFont));
    headerCell[6] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ts", null, localtion), contentBoldFont));
    headerCell[7] = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.total", null, localtion), contentBoldFont));
    headerCell[8] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.traite", null, localtion), contentBoldFont));
    headerCell[9] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.arrete", null, localtion), contentBoldFont));
    headerCell[10] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.atraiter", null, localtion), contentBoldFont));
    headerCell[11] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.provision", null, localtion), contentBoldFont));
    headerCell[12] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.totalfinal", null, localtion), contentBoldFont));   
    headerCell[13] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.devisrefuse", null, localtion), contentBoldFont));   
    headerCell[14] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ecartm", null, localtion), contentBoldFont));
    headerCell[15] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ecartm-1", null, localtion), contentBoldFont));
    headerCell[16] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.variation", null, localtion), contentBoldFont));
    headerCell[17] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ecartdernierpoint", null, localtion), contentBoldFont));
    headerCell[18] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ecartdernierpoint/m", null, localtion), contentBoldFont));   
    headerCell[19] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.%avctba", null, localtion), contentBoldFont));
    headerCell[20] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.montnatba", null, localtion), contentBoldFont));   
    headerCell[21] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.%avctreel", null, localtion), contentBoldFont));
    headerCell[22] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.montantreel", null, localtion), contentBoldFont));
    headerCell[23] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.canto", null, localtion), contentBoldFont));
    headerCell[24] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.badge", null, localtion), contentBoldFont));
    headerCell[25] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.grue", null, localtion), contentBoldFont));
    headerCell[26] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.lift", null, localtion), contentBoldFont));
    headerCell[27] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.benne", null, localtion), contentBoldFont));
    headerCell[28] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.nettoy", null, localtion), contentBoldFont));
    headerCell[29] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.autres", null, localtion), contentBoldFont));
    headerCell[30] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.prorata", null, localtion), contentBoldFont));
    headerCell[31] = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.total", null, localtion), contentBoldFont));
    headerCell[32] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.prestation/traite", null, localtion), contentBoldFont));
    headerCell[33] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.penalitefacture", null, localtion), contentBoldFont));
    headerCell[34] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.prorataappliqusest", null, localtion), contentBoldFont));
    headerCell[35] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.proratamarche", null, localtion), contentBoldFont));
    headerCell[36] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.proratasurrad", null, localtion), contentBoldFont));
    headerCell[37] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.marchesrestantatraiter%", null, localtion), contentBoldFont));
    headerCell[38] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.marchesrestantatraiter", null, localtion), contentBoldFont));
    headerCell[39] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.variationsuauxtransferts", null, localtion), contentBoldFont));
    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);
View Full Code Here

    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);
View Full Code Here

        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);
View Full Code Here

 
  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

    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

 
  private void addGrid4() throws DocumentException{
    //Title
    PdfPTable titleTable = new PdfPTable(1);
    titleTable.setWidthPercentage(100f);
    PdfPCell titleCell = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.totalchantier", null, localtion), contentBoldFont));
    titleCell.setBorder(Rectangle.NO_BORDER);
    titleCell.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
    titleTable.addCell(titleCell);
    addContent(titleTable);
    float[] wf = {
        2.5f,
        2.5f
        2.5f
        2.5f,   
        2.5f
        2.5f
        2.5f
        2.5f,
        2.5f,
        2.5f,
        2.5f,
        2.5f,
        2.5f
        2.5f
        2.5f,   
        2.5f
        2.5f
        2.5f
        2.5f,
        2.5f,
        2.5f,
        2.5f,
        2.5f,
        2.5f
        2.5f
        2.5f,   
        2.5f
        2.5f
        2.5f
        2.5f,
        2.5f,
        2.5f,
        2.5f,
        2.5f,
        2.5f
        2.5f
        2.5f,   
        2.5f
        2.5f
        2.5f,
        2.5f
      };
   
    //Header
    PdfPCell[] headerCell = new PdfPCell[41];
    headerCell[0] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.lot", 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.societe", null, localtion), contentBoldFont));
    headerCell[3] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.obj", null, localtion), contentBoldFont));
    headerCell[4] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.+-", null, localtion), contentBoldFont));
    headerCell[5] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.rd", null, localtion), contentBoldFont));
    headerCell[6] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ts", null, localtion), contentBoldFont));
    headerCell[7] = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.total", null, localtion), contentBoldFont));
    headerCell[8] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.traite", null, localtion), contentBoldFont));
    headerCell[9] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.arrete", null, localtion), contentBoldFont));
    headerCell[10] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.atraiter", null, localtion), contentBoldFont));
    headerCell[11] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.provision", null, localtion), contentBoldFont));
    headerCell[12] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.totalfinal", null, localtion), contentBoldFont));   
    headerCell[13] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.devisrefuse", null, localtion), contentBoldFont));   
    headerCell[14] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ecartm", null, localtion), contentBoldFont));
    headerCell[15] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ecartm-1", null, localtion), contentBoldFont));
    headerCell[16] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.variation", null, localtion), contentBoldFont));
    headerCell[17] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ecartdernierpoint", null, localtion), contentBoldFont));
    headerCell[18] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.ecartdernierpoint/m", null, localtion), contentBoldFont));   
    headerCell[19] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.%avctba", null, localtion), contentBoldFont));
    headerCell[20] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.montnatba", null, localtion), contentBoldFont));   
    headerCell[21] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.%avctreel", null, localtion), contentBoldFont));
    headerCell[22] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.montantreel", null, localtion), contentBoldFont));
    headerCell[23] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.canto", null, localtion), contentBoldFont));
    headerCell[24] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.badge", null, localtion), contentBoldFont));
    headerCell[25] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.grue", null, localtion), contentBoldFont));
    headerCell[26] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.lift", null, localtion), contentBoldFont));
    headerCell[27] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.benne", null, localtion), contentBoldFont));
    headerCell[28] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.nettoy", null, localtion), contentBoldFont));
    headerCell[29] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.autres", null, localtion), contentBoldFont));
    headerCell[30] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.prorata", null, localtion), contentBoldFont));
    headerCell[31] = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.total", null, localtion), contentBoldFont));
    headerCell[32] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.prestation/traite", null, localtion), contentBoldFont));
    headerCell[33] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.penalitefacture", null, localtion), contentBoldFont));
    headerCell[34] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.prorataappliqusest", null, localtion), contentBoldFont));
    headerCell[35] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.proratamarche", null, localtion), contentBoldFont));
    headerCell[36] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.proratasurrad", null, localtion), contentBoldFont));
    headerCell[37] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.marchesrestantatraiter%", null, localtion), contentBoldFont));
    headerCell[38] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.marchesrestantatraiter", null, localtion), contentBoldFont));
    headerCell[39] = new PdfPCell(new Phrase(messageSource.getMessage("pdf.synthese.variationsuauxtransferts", null, localtion), contentBoldFont));
    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 grid4Table = new PdfPTable(41);
    String[] arrGrid4 = grid4.split(Constants.SEPRATE);
    String tmp;
    for (int i=0;i<arrGrid4.length;i++) {
      tmp = arrGrid4[i];
      grid4Table.addCell(new PdfPCell(new Phrase((tmp.equals("null") ? "" : tmp), contentNormalFont)))
    }
    grid4Table.setWidthPercentage(100f);
    addContent(grid4Table)
   
  }
View Full Code Here

    PdfPTable sumGrid4Table = new PdfPTable(41);
    String[] arrSumGrid4 = sumGrid4.split(Constants.SEPRATE);
    String tmp;
    for (int i=0;i<arrSumGrid4.length;i++) {
      tmp = arrSumGrid4[i];
      sumGrid4Table.addCell(new PdfPCell(new Phrase(tmp.equals("null") ? "" : (tmp + messageSource.getMessage("pdf.gestiondto.content.euro", null, localtion)), contentNormalFont)))
    }
    sumGrid4Table.setWidthPercentage(100f);
    addContent(sumGrid4Table)
  }
View Full Code Here

  private void addAllFichestDto() throws DocumentException {
    //Title
    PdfPTable headerTable = new PdfPTable(1);
    headerTable.setWidthPercentage(100f);
   
    PdfPCell headerCell = new PdfPCell(new Phrase(messageSource.getMessage("pdf.allfichest.fichedesuividusoustraitant", null, localtion), contentBoldFont));
    headerCell.setBorder(Rectangle.NO_BORDER);
    headerCell.setHorizontalAlignment(PdfPTable.ALIGN_CENTER);
    headerTable.addCell(headerCell);
   
    addContent(headerTable);
   
    //Information Generals
    headerTable = new PdfPTable(1);
    headerTable.setWidthPercentage(100f);
    headerCell = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.generalInformation", null, localtion), contentBoldFont));
    headerCell.setBorder(Rectangle.NO_BORDER);
    headerCell.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
    headerTable.addCell(headerCell);

    addContent(headerTable);
 
    // Information Details
    String arrGeneraleInformation[]= generaleInformation.split(Constants.SEPRATE);
    PdfPTable generaleInformationTable = new PdfPTable(6);
    PdfPCell generaleInformationCell;
    generaleInformationTable.setWidthPercentage(100f);
    String [] messages = {messageSource.getMessage("FicheST.chantier",null, localtion) + " : ",messageSource.getMessage("FicheST.lot", null, localtion) + " : ",
        messageSource.getMessage("FicheST.foreman", null, localtion) + " : ",
        messageSource.getMessage("pdf.synthese.societe", null, localtion) + " : ",messageSource.getMessage("FicheST.lotType", null, localtion) + " : ",
        messageSource.getMessage("pdf.gestiondto.montantobjectif",null,localtion) + " : "};
    for(int i=0;i<arrGeneraleInformation.length;i++){
      switch (i) {
        case 0
          generaleInformationCell = new PdfPCell(new Phrase(messages[0], contentBoldFont));
          generaleInformationCell.setBorder(Rectangle.NO_BORDER);
          generaleInformationCell.enableBorderSide(Rectangle.TOP);
          generaleInformationCell.enableBorderSide(Rectangle.LEFT);
          generaleInformationTable.addCell(generaleInformationCell);
         
          break;
        case 1
          generaleInformationCell = new PdfPCell(new Phrase(messages[1], contentBoldFont));
          generaleInformationCell.setBorder(Rectangle.NO_BORDER);
          generaleInformationCell.enableBorderSide(Rectangle.TOP);
          generaleInformationTable.addCell(generaleInformationCell);
          break;
        case 2
          generaleInformationCell = new PdfPCell(new Phrase(messages[2], contentBoldFont));
          generaleInformationCell.setBorder(Rectangle.NO_BORDER);
          generaleInformationCell.enableBorderSide(Rectangle.TOP);
          generaleInformationTable.addCell(generaleInformationCell);
          break;
        case 3
          generaleInformationCell = new PdfPCell(new Phrase(messages[3], contentBoldFont));
          generaleInformationCell.setBorder(Rectangle.NO_BORDER);
          generaleInformationCell.enableBorderSide(Rectangle.BOTTOM);
          generaleInformationCell.enableBorderSide(Rectangle.LEFT);
          generaleInformationTable.addCell(generaleInformationCell);
          break;
        case 4
          generaleInformationCell = new PdfPCell(new Phrase(messages[4], contentBoldFont));
          generaleInformationCell.setBorder(Rectangle.NO_BORDER);
          generaleInformationCell.enableBorderSide(Rectangle.BOTTOM);
          generaleInformationTable.addCell(generaleInformationCell);
          break;
        case 5
          generaleInformationCell = new PdfPCell(new Phrase(messages[5], contentBoldFont));
          generaleInformationCell.setBorder(Rectangle.NO_BORDER);
          generaleInformationCell.enableBorderSide(Rectangle.BOTTOM);
          generaleInformationTable.addCell(generaleInformationCell);
          break;
      }
      generaleInformationCell = new PdfPCell(new Phrase(arrGeneraleInformation[i].equals("null") ? "" : arrGeneraleInformation[i], contentNormalFont));
      if(i == 0 || i == 1 || i == 2){
        generaleInformationCell.setBorder(Rectangle.NO_BORDER);
        generaleInformationCell.enableBorderSide(Rectangle.TOP);
        if(i == 2)
          generaleInformationCell.enableBorderSide(Rectangle.RIGHT);
        generaleInformationTable.addCell(generaleInformationCell);
      }
      if(i == 3 || i == 4 || i == 5){
        generaleInformationCell.setBorder(Rectangle.NO_BORDER);
        generaleInformationCell.enableBorderSide(Rectangle.BOTTOM);
        if(i == 5)
          generaleInformationCell.enableBorderSide(Rectangle.RIGHT);
        generaleInformationTable.addCell(generaleInformationCell);
      }
    }
    float[] wfGeneraleInformation = {
        3,
        6,
        3,
        6,
        7,
        6
      };
    generaleInformationTable.setWidths(wfGeneraleInformation);
    addContent(generaleInformationTable);
    lineBreak();
   
    PdfPCell leftCell,spaceCell1,middleCell,spaceCell2,rightCell;
    PdfPTable parent = new PdfPTable(5);
    parent.setSpacingBefore(0f);
    parent.setWidthPercentage(100f);
    float[] wfParent = {
        25,
        5,//Libellé risque codification
        25,
        5,//Origine de détection
        40
      };
    parent.setWidths(wfParent);

    //Add Condition
    leftCell = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.conditions", null, localtion),contentBoldFont));
    leftCell.setBorder(Rectangle.NO_BORDER);
    parent.addCell(leftCell);
   
    spaceCell1 = new PdfPCell();
    spaceCell1.setBorder(Rectangle.NO_BORDER);
    parent.addCell(spaceCell1);
   
    middleCell = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.prestations", null, localtion),contentBoldFont));
    middleCell.setBorder(Rectangle.NO_BORDER);
    parent.addCell(middleCell);
   
    spaceCell2 = new PdfPCell();
    spaceCell2.setBorder(Rectangle.NO_BORDER);
    parent.addCell(spaceCell2);

    rightCell = new PdfPCell(new Phrase(messageSource.getMessage("FicheST.informationComplementaries", null, localtion), contentBoldFont));
    rightCell.setBorder(Rectangle.NO_BORDER);
    parent.addCell(rightCell);
   
    //Add content
    PdfPTable conditionTable = addConditions();
View Full Code Here

        messageSource.getMessage("pdf.allfichest.decenalenecessaire", null, localtion) + " : ",messageSource.getMessage("pdf.allfichest.demandedagrement", null, localtion) + " : ",
        messageSource.getMessage("pdf.allfichest.dgdpresente",null, localtion) + " : ",messageSource.getMessage("FicheST.date", null, localtion) + " : "};
    for(int i=0;i<tmp.length;i++){
      switch (i) {
      case 0:
        conditionsCell = new PdfPCell(new Phrase(messages[0], contentBoldFont));
        conditionsCell.setBorder(Rectangle.NO_BORDER);
        conditionsTable.addCell(conditionsCell);
        break;
      case 1:
        conditionsCell = new PdfPCell(new Phrase(messages[1], contentBoldFont));
        conditionsCell.setBorder(Rectangle.NO_BORDER);
        conditionsTable.addCell(conditionsCell);
        break;
      case 2:
        conditionsCell = new PdfPCell(new Phrase(messages[2], contentBoldFont));
        conditionsCell.setBorder(Rectangle.NO_BORDER);
        conditionsTable.addCell(conditionsCell);
        break;
      case 3:
        conditionsCell = new PdfPCell(new Phrase(messages[3], contentBoldFont));
        conditionsCell.setBorder(Rectangle.NO_BORDER);
        conditionsTable.addCell(conditionsCell);
        break;
      case 4:
        conditionsCell = new PdfPCell(new Phrase(messages[4], contentBoldFont));
        conditionsCell.setBorder(Rectangle.NO_BORDER);
        conditionsTable.addCell(conditionsCell);
        break;
      case 5:
        conditionsCell = new PdfPCell(new Phrase(messages[5], contentBoldFont));
        conditionsCell.setBorder(Rectangle.NO_BORDER);
        conditionsTable.addCell(conditionsCell);
        break;
      }
      conditionsCell = new PdfPCell(new Phrase(tmp[i].equals("null") ? "" : tmp[i] , contentNormalFont));
      conditionsCell.setBorder(Rectangle.NO_BORDER);
      conditionsTable.addCell(conditionsCell);
    }
    float[] wf = {
        10,
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.