Example usage for com.itextpdf.text.pdf PdfPTable setSpacingBefore

List of usage examples for com.itextpdf.text.pdf PdfPTable setSpacingBefore

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf PdfPTable setSpacingBefore.

Prototype

public void setSpacingBefore(final float spacing) 

Source Link

Document

Sets the spacing before this table.

Usage

From source file:report.pdfs.Gas_PDF_Report.java

private void createTable(Section catPart) throws BadElementException {
    PdfPTable table = new PdfPTable(4);
    table.setSpacingBefore(25);
    // t.setBorderColor(BaseColor.GRAY);
    // t.setPadding(4);
    // t.setSpacing(4);
    // t.setBorderWidth(1);

    PdfPCell c1 = new PdfPCell(new Phrase("Type"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);/*from w ww.  j av a2 s . c  om*/

    c1 = new PdfPCell(new Phrase("Expense"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Month"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Year"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    table.setHeaderRows(1);

    selectAll();
    calcGExpense(table);

    catPart.add(table);
}

From source file:report.pdfs.Herd_PDF_Report.java

private void createTable(Section catPart) throws BadElementException {
    PdfPTable table = new PdfPTable(6);
    table.setSpacingBefore(25);
    // t.setBorderColor(BaseColor.GRAY);
    // t.setPadding(4);
    // t.setSpacing(4);
    // t.setBorderWidth(1);

    PdfPCell c1 = new PdfPCell(new Phrase("Type"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);//from w  ww  .  j a v a 2  s. co m

    c1 = new PdfPCell(new Phrase("Herd ID"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Feed"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Medical"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Vet Visits"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Total"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    table.setHeaderRows(1);

    selectAll();
    getExpenses(table);

    catPart.add(table);
}

From source file:report.pdfs.Labour_PDF_Report.java

private void createTable(Section catPart) throws BadElementException {
    PdfPTable table = new PdfPTable(4);
    table.setSpacingBefore(25);
    // t.setBorderColor(BaseColor.GRAY);
    // t.setPadding(4);
    // t.setSpacing(4);
    // t.setBorderWidth(1);

    PdfPCell c1 = new PdfPCell(new Phrase("Type"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);//from w w w  .j ava 2s . c o  m

    c1 = new PdfPCell(new Phrase("Expense"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Month"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Year"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    table.setHeaderRows(1);

    selectAll();
    calcLExpense(table);

    catPart.add(table);
}

From source file:report.pdfs.Lighting_PDF_Report.java

private void createTable(Section catPart) throws BadElementException {
    PdfPTable table = new PdfPTable(4);
    table.setSpacingBefore(25);
    // t.setBorderColor(BaseColor.GRAY);
    // t.setPadding(4);
    // t.setSpacing(4);
    // t.setBorderWidth(1);

    PdfPCell c1 = new PdfPCell(new Phrase("Type"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);//  w w  w . ja va 2  s  .  c  o m

    c1 = new PdfPCell(new Phrase("Expense"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Month"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Year"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    table.setHeaderRows(1);

    selectAll();
    calcLiExpense(table);

    catPart.add(table);
}

From source file:report.pdfs.Machinery_PDF_Report.java

private void createTable(Section catPart) throws BadElementException {
    PdfPTable table = new PdfPTable(4);
    table.setSpacingBefore(25);
    // t.setBorderColor(BaseColor.GRAY);
    // t.setPadding(4);
    // t.setSpacing(4);
    // t.setBorderWidth(1);

    PdfPCell c1 = new PdfPCell(new Phrase("Type"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);/*from   w w w  .  java2  s.c om*/

    c1 = new PdfPCell(new Phrase("Expense"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Month"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Year"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    table.setHeaderRows(1);

    selectAll();
    calcMaExpense(table);

    catPart.add(table);
}

From source file:report.pdfs.Medical_PDF_Report.java

private void createTable(Section catPart) throws BadElementException {
    PdfPTable table = new PdfPTable(5);
    table.setSpacingBefore(25);
    // t.setBorderColor(BaseColor.GRAY);
    // t.setPadding(4);
    // t.setSpacing(4);
    // t.setBorderWidth(1);

    PdfPCell c1 = new PdfPCell(new Phrase("Type"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);/*w w w.  ja v  a 2  s .co m*/

    c1 = new PdfPCell(new Phrase("Cow Tag"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Info"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Date"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Medical Cost"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    table.setHeaderRows(1);

    selectAll();
    getExpenses(table);

    catPart.add(table);
}

From source file:report.pdfs.Mortgaged_PDF_Report.java

private void createTable(Section catPart) throws BadElementException {
    PdfPTable table = new PdfPTable(4);
    table.setSpacingBefore(25);
    // t.setBorderColor(BaseColor.GRAY);
    // t.setPadding(4);
    // t.setSpacing(4);
    // t.setBorderWidth(1);

    PdfPCell c1 = new PdfPCell(new Phrase("Type"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);/*ww w . j a  va2s  .co m*/

    c1 = new PdfPCell(new Phrase("Expense"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Month"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Year"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    table.setHeaderRows(1);

    selectAll();
    calcMExpense(table);

    catPart.add(table);
}

From source file:report.pdfs.Rented_PDF_Report.java

private void createTable(Section catPart) throws BadElementException {
    PdfPTable table = new PdfPTable(4);
    table.setSpacingBefore(25);
    // t.setBorderColor(BaseColor.GRAY);
    // t.setPadding(4);
    // t.setSpacing(4);
    // t.setBorderWidth(1);

    PdfPCell c1 = new PdfPCell(new Phrase("Type"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);/*from   www  . j ava2s  . co  m*/

    c1 = new PdfPCell(new Phrase("Expense"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Month"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Year"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    table.setHeaderRows(1);

    selectAll();
    calcRExpense(table);

    catPart.add(table);
}

From source file:report.pdfs.Slurry_PDF_Report.java

private void createTable(Section catPart) throws BadElementException {
    PdfPTable table = new PdfPTable(4);
    table.setSpacingBefore(25);
    // t.setBorderColor(BaseColor.GRAY);
    // t.setPadding(4);
    // t.setSpacing(4);
    // t.setBorderWidth(1);

    PdfPCell c1 = new PdfPCell(new Phrase("Type"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);//from  w w  w .  j  a v a  2  s .c  om

    c1 = new PdfPCell(new Phrase("Expense"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Month"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Year"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    table.setHeaderRows(1);

    selectAll();
    calcSExpense(table);

    catPart.add(table);
}

From source file:report.pdfs.Vet_Visit_PDF_Report.java

private void createTable(Section catPart) throws BadElementException {
    PdfPTable table = new PdfPTable(5);
    table.setSpacingBefore(25);
    // t.setBorderColor(BaseColor.GRAY);
    // t.setPadding(4);
    // t.setSpacing(4);
    // t.setBorderWidth(1);

    PdfPCell c1 = new PdfPCell(new Phrase("Type"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);/*from  w  w  w.ja v  a  2 s.  co  m*/

    c1 = new PdfPCell(new Phrase("Cow Tag"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Info"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Date"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("Vet Visit Cost"));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    table.setHeaderRows(1);

    selectAll();
    getExpenses(table);

    catPart.add(table);
}