List of usage examples for com.itextpdf.text Section add
@Override public boolean add(final Element element)
Paragraph
, List
, Table
or another Section
to this Section
. From source file:report.pdfs.Mortgaged_PDF_Report.java
private void addBarChart(Section catPart) { Mortgaged_Bar_Chart_Report chart = new Mortgaged_Bar_Chart_Report(show, "Mortgaged Expenses Overview"); Image To_be_Added = null;//from ww w . ja va2s .c om try { To_be_Added = Image.getInstance("bar_chart.png"); } catch (BadElementException e) { e.printStackTrace(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } To_be_Added.setAlignment(Image.MIDDLE | Image.TEXTWRAP); //To_be_Added.setBorder(Image.BOX); //To_be_Added.setBorderWidth(15); catPart.add(To_be_Added); }
From source file:report.pdfs.Mortgaged_PDF_Report.java
private void addPieChart(Section catPart) { Mortgaged_Pie_Chart_Report chart = new Mortgaged_Pie_Chart_Report(show, "Comparison", "Mortgaged Expenses Overview"); Image To_be_Added = null;//from w w w . jav a2 s .c om try { To_be_Added = Image.getInstance("pie_chart.png"); } catch (BadElementException e) { e.printStackTrace(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } To_be_Added.setAlignment(Image.MIDDLE | Image.TEXTWRAP); //To_be_Added.setBorder(Image.BOX); //To_be_Added.setBorderWidth(15); catPart.add(To_be_Added); }
From source file:report.pdfs.Rented_PDF_Report.java
private void createTable(Section catPart) throws BadElementException { PdfPTable table = new PdfPTable(4); table.setSpacingBefore(25);//from w w w. jav a2 s . c om // 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); 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.Rented_PDF_Report.java
private void addBarChart(Section catPart) { Rented_Bar_Chart_Report chart = new Rented_Bar_Chart_Report(show, "Rented Expenses Overview"); Image To_be_Added = null;//from w w w . j a v a 2 s .c om try { To_be_Added = Image.getInstance("bar_chart.png"); } catch (BadElementException e) { e.printStackTrace(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } To_be_Added.setAlignment(Image.MIDDLE | Image.TEXTWRAP); //To_be_Added.setBorder(Image.BOX); //To_be_Added.setBorderWidth(15); catPart.add(To_be_Added); }
From source file:report.pdfs.Rented_PDF_Report.java
private void addPieChart(Section catPart) { Rented_Pie_Chart_Report chart = new Rented_Pie_Chart_Report(show, "Comparison", "Rented Expenses Overview"); Image To_be_Added = null;//from www . j av a2 s .c o m try { To_be_Added = Image.getInstance("pie_chart.png"); } catch (BadElementException e) { e.printStackTrace(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } To_be_Added.setAlignment(Image.MIDDLE | Image.TEXTWRAP); //To_be_Added.setBorder(Image.BOX); //To_be_Added.setBorderWidth(15); catPart.add(To_be_Added); }
From source file:report.pdfs.Slurry_PDF_Report.java
private void createTable(Section catPart) throws BadElementException { PdfPTable table = new PdfPTable(4); table.setSpacingBefore(25);/* w w w . j a v a 2s .c o m*/ // 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); 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.Slurry_PDF_Report.java
private void addBarChart(Section catPart) { Slurry_Bar_Chart_Report chart = new Slurry_Bar_Chart_Report(show, "Slurry Expenses Overview"); Image To_be_Added = null;//from w w w .j a v a2s .co m try { To_be_Added = Image.getInstance("bar_chart.png"); } catch (BadElementException e) { e.printStackTrace(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } To_be_Added.setAlignment(Image.MIDDLE | Image.TEXTWRAP); //To_be_Added.setBorder(Image.BOX); //To_be_Added.setBorderWidth(15); catPart.add(To_be_Added); }
From source file:report.pdfs.Slurry_PDF_Report.java
private void addPieChart(Section catPart) { Slurry_Pie_Chart_Report chart = new Slurry_Pie_Chart_Report(show, "Comparison", "Slurry Expenses Overview"); Image To_be_Added = null;/* www .jav a 2 s.c o m*/ try { To_be_Added = Image.getInstance("pie_chart.png"); } catch (BadElementException e) { e.printStackTrace(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } To_be_Added.setAlignment(Image.MIDDLE | Image.TEXTWRAP); //To_be_Added.setBorder(Image.BOX); //To_be_Added.setBorderWidth(15); catPart.add(To_be_Added); }
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);//from w w w. j a v a 2 s .co m // 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); 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); }
From source file:report.pdfs.Vet_Visit_PDF_Report.java
private void addBarChart(Section catPart) { Vet_Visit_Bar_Chart_Report chart = new Vet_Visit_Bar_Chart_Report(show, "Vet Visit Expenses Overview"); Image To_be_Added = null;/*from ww w.j a v a2 s . co m*/ try { To_be_Added = Image.getInstance("bar_chart.png"); } catch (BadElementException e) { e.printStackTrace(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } To_be_Added.setAlignment(Image.MIDDLE | Image.TEXTWRAP); //To_be_Added.setBorder(Image.BOX); //To_be_Added.setBorderWidth(15); catPart.add(To_be_Added); }