// Include table public void page4() { drawBorder(pageIcon, "IDIT"); drawHeader(userInfo.getClientHeading(), "Intentionally Defective Irrevocable Trust (IDIT)"); // Summary Rectangle rct = new Rectangle(prctTop); PageTable table = new PageTable(writer); table.setTableFormat(rct, 3); table.setTableFont("arial.TTF"); table.setTableFontBold("arialbd.TTF"); table.setFontSize(12); float widths[] = {.45f, .1f, .45f}; int alignments[] = {PdfPCell.ALIGN_LEFT, PdfPCell.ALIGN_CENTER, PdfPCell.ALIGN_RIGHT}; table.setColumnWidths(widths); table.setColumnAlignments(alignments); String noteStructure = "Annual Level Principal + Interest"; if (sidit.getNoteType() == 1) noteStructure = "Annual Amoritized"; if (sidit.getNoteType() == 2) noteStructure = "Annual Interest + Balloon"; String cells[][] = { {"SUMMARY", "", "", "[colspan=3,align=center,bold=1][][]"}, {"", "", "", "[][][]"}, { "Value of Assets to be Sold (pre discount)", "", dollar.format(sidit.getFmv() - sidit.getGiftAmount()), "[][][]" }, { "Discount", "", percent.format(1.0 - (sidit.getDmv() / (sidit.getFmv() - sidit.getGiftAmount()))), "[][][]" }, {"Net Value of Assets Sold", "", dollar.format(sidit.getDmv()), "[][][]"}, {"Amount of Gift to Trust", "", dollar.format(sidit.getGiftAmount()), "[][][]"}, {"Total Amount of Trust Assets", "", dollar.format(sidit.getFmv()), "[][][]"}, { "Yield on Trust Assets(Growth/Income)", "", percent.format(sidit.getAssetGrowth() + sidit.getAssetIncome()), "[][][]" }, {"Note Value", "", dollar.format(sidit.getDmv()), "[][][]"}, {"Note Term", "", number.format(sidit.getNoteTerm()), "[][][]"}, {"Note Interest Rate per Year", "", percent.format(sidit.getNoteRate()), "[][][]"}, {"Note Payout Structure", "", noteStructure, "[][][]"}, { "Life Premium (paid for " + Integer.toString(sidit.getNoteTerm()) + " years)", "", dollar.format(sidit.getLifePremium()), "[][][]" }, {"Life Death Benefit", "", dollar.format(sidit.getLifeDeathBenefit()), "[][][]"} }; table.buildTableEx(cells); table.drawTable(); // Build the Cash Flow Table here!!!! // Draw cash flow table rct = new Rectangle(prctBottom); rct.setTop(rct.getTop() + (1.f * 72)); float widths2[] = {.1f, .2f, .2f, .2f, .2f, .1f, .2f, .2f}; int alignments2[] = { PdfPCell.ALIGN_CENTER, PdfPCell.ALIGN_RIGHT, PdfPCell.ALIGN_RIGHT, PdfPCell.ALIGN_RIGHT, PdfPCell.ALIGN_RIGHT, PdfPCell.ALIGN_RIGHT, PdfPCell.ALIGN_RIGHT, PdfCell.ALIGN_RIGHT }; PageTable cashFlow = new PageTable(writer); cashFlow.setTableFormat(rct, 8); cashFlow.setTableFont("arial.TTF"); cashFlow.setTableFontBold("arialbd.TTF"); cashFlow.setFontSize(8); cashFlow.setColumnWidths(widths2); cashFlow.setColumnAlignments(alignments2); String heading[][] = { { "Trust Cash Flow", "", "", "", "", "", "", "", "[bold=1,colspan=8,align=center,ptsize=12][][][][][][][]" }, {" ", "", "", "", "", "", "", "", "[][][][][][][][]"}, { "Year", "Beg. Principal", "Growth", "Income", "Payout", "Premium Payment", "End Principal", "Amt. to Family *", "[bold=1,border=l+t+b+r,align=center][bold=1,border=l+t+b+r,align=center]" + "[bold=1,border=l+t+b+r,align=center][bold=1,border=l+t+b+r,align=center]" + "[bold=1,border=l+t+b+r,align=center][bold=1,border=l+t+b+r,align=center]" + "[bold=1,border=l+t+b+r,align=center][bold=1,border=l+t+b+r,align=center]" } }; String rows[][] = getCashFlow(); String singleRow[][] = new String[1][7]; String cont[][] = { { "[Continued on Next Page]", "", "", "", "", "", "", "[bold=1,colspan=7,align=center][][][][][][][]" }, {" ", "", "", "", "", "", "", "[][][][][][][][]"} }; int idx = 0; if (sidit.getNoteTerm() > 17) { cashFlow.buildTableEx(heading); while (idx < 12) { singleRow[0] = rows[idx++]; cashFlow.buildTableEx(singleRow); } cashFlow.buildTableEx(cont); cashFlow.drawTable(); // Draw the following label at the bottom String lb1 = "* Includes life insurance should death occur at any year minus the value of the note."; drawLabel(lb1, prctBottom, "GARA.TTF", new Color(64, 64, 64), 9, LBL_LEFT, LBL_BOTTOM); newPage(); // We need to go to a new page // Redraw heading drawBorder(pageIcon, "IDIT"); drawHeader(userInfo.getClientHeading(), "Intentionaly Defective Irrevocable Trust"); // Readraw Table Heading rct = new Rectangle(prctTop); cashFlow = new PageTable(writer); cashFlow.setTableFormat(rct, 8); cashFlow.setTableFont("arial.TTF"); cashFlow.setTableFontBold("arialbd.TTF"); cashFlow.setFontSize(8); cashFlow.setColumnWidths(widths2); cashFlow.setColumnAlignments(alignments2); heading[0][0] = "Trust Cash Flow (Cont.)"; cashFlow.buildTableEx(heading); // Include the missing rows while (idx < sidit.getNoteTerm()) { singleRow[0] = rows[idx++]; cashFlow.buildTableEx(singleRow); } cashFlow.drawTable(); drawLabel(lb1, prctBottom, "GARA.TTF", new Color(64, 64, 64), 9, LBL_LEFT, LBL_BOTTOM); } else { cashFlow.buildTableEx(heading); cashFlow.buildTableEx(getCashFlow()); cashFlow.drawTable(); // Draw the following label at the bottom String lb1 = "* Includes life insurance should death occur at any year minus the value of the note."; drawLabel(lb1, prctBottom, "GARA.TTF", new Color(64, 64, 64), 9, LBL_LEFT, LBL_BOTTOM); } }
public void page1() { drawBorder(pageIcon, "IDIT"); drawHeader(userInfo.getClientHeading(), "The Problem"); String sec1[] = { "Your assets of " + sidit.getAssetName() + " have the potential to grow very dramatically over the next few years. This is great news until we calculate your future estate tax liability", }; String sec2[] = { "When an asset is growing very rapidly in one's estate, and the estate tax liability is growing faster than can be reduced by normal gifting techniques, a different approach can be taken.", " ", "Let's examine a combination of leveraging techniques that can be utilized with this circumstance." }; Rectangle rct = new Rectangle(prctTop); Rectangle rctx = this.drawSection(rct, "", sec1, 0, 14, 14); rct.setTop(rctx.getBottom()); rct.setLeft(rct.getLeft() + prctTop.getWidth() * .125f); rct.setRight(rct.getRight() - prctTop.getWidth() * .125f); // Draw the Table PageTable table = this.getTable(rct, 2); String rows[][] = { {"Today's Fair Market Value", "" + dollar.format(sidit.getFmv()), "[][bold=1]"}, {"Projected Years of Growth", "" + integer.format(sidit.getFinalDeath()), "[][bold=1]"}, {"Average Growth Rate", "" + percent.format(sidit.getAssetGrowth()), "[][bold=1]"}, {"Average Income Rate", "" + percent.format(sidit.getAssetIncome()), "[][bold=1]"}, {" ", "", "[colspan=1][]"}, { "Total Value (projected) in Taxable Estate", "" + dollar.format(sidit.getFinalBalance()), "[bold=1][bold=1]" }, {"", "", "[colspan=1][]"}, { "Estate Tax (" + percent.format(.55) + ")", "" + dollar.format(sidit.getFinalBalance() * .55), "[Bold=1,Color=" + pgRed + "][Bold=1,Color=" + pgRed + "]" }, {"", "", "[colspan=1][]"}, { "Net Value Passing to Family", "" + dollar.format((sidit.getFinalBalance() - (sidit.getFinalBalance() * .55))), "[Bold=1,Color=" + pgGreen + "][Bold=1,Color=" + pgGreen + "]" } }; int alignments[] = {LFT, RGT}; table.setColumnAlignments(alignments); table.setFontSize(14); table.buildTableEx(rows); table.drawTable(); // Draw the graph ************ taxPie( prctLLeft, sidit.getFinalBalance(), sidit.getFinalBalance() * .55, "Estate Tax", "Net to Family"); // ***************** drawSection(prctLRight, "", sec2, 0, 14, 14); }
public void page3() { drawBorder(pageIcon, "IDIT"); drawHeader(userInfo.getClientHeading(), "Intentionally Defective Irrevocable Trust (IDIT)"); Rectangle rct = new Rectangle(prctTop); rct.setTop(rct.getTop() - (12 * _1_4TH)); rct.setBottom(rct.getBottom() - _1_4TH); rct.setLeft(rct.getLeft() - _1_4TH); if (useLLC) { if (userInfo.isSingle()) { if (userInfo.getClientGender().equalsIgnoreCase("M")) { drawDiagram("LLC-SIDIT-M.png", rct, CNTR_TB + CNTR_LR); } else { drawDiagram("LLC-SIDIT-F.png", rct, CNTR_TB + CNTR_LR); } } else { drawDiagram("LLC-SIDIT.png", rct, CNTR_TB + CNTR_LR); } } else { if (userInfo.isSingle()) { if (userInfo.getClientGender().equalsIgnoreCase("M")) { drawDiagram("SIDIT-M.png", rct, CNTR_TB + CNTR_LR); } else { drawDiagram("SIDIT-F.png", rct, CNTR_TB + CNTR_LR); } } else { drawDiagram("SIDIT.png", rct, CNTR_LR + CNTR_TB); } } // We now need the values placed on the left hand side of the page! // Now do the table. Rectangle lrct = new Rectangle(prctLLeft); lrct.setTop(lrct.getTop() - (_1_2TH + _1_4TH)); drawSection( lrct, "Comparison in " + Integer.toString(sidit.getFinalDeath()) + " Years", new String[0], 0); rct = new Rectangle(prctLLeft); rct.setTop(rct.getTop() - (_1_2TH + _1_2TH)); PageTable table = new PageTable(writer); table.setTableFormat(rct, 4); CellInfoFactory cif = new CellInfoFactory(); BaseFont baseFont = PageUtils.LoadFont("GARA.TTF"); BaseFont baseFontBold = PageUtils.LoadFont("GARABD.TTF"); float ptSize = 10f; cif.setDefaultFont(new Font(baseFont, ptSize)); Color green = new Color(0, 176, 0); Color red = new Color(192, 0, 0); Font fontBold = new Font(baseFontBold, ptSize, Font.NORMAL); Font fontBGreen = new Font(baseFontBold, ptSize, Font.NORMAL, green); Font fontBRed = new Font(baseFontBold, ptSize, Font.NORMAL, red); double f = sidit.getFinalBalance(); double t = f * .55; double result = f - t; double balance = sidit.getBalance()[sidit.getFinalDeath() - 1] + sidit.getLifeDeathBenefit(); double note = sidit.getNoteBalance()[0]; double noteTax = note * .55; double noteValueToFamily = note - noteTax; CellInfo cellData[][] = { // Column Headers { cif.getCellInfo(" "), cif.getCellInfo("Keep in the Estate", Element.ALIGN_CENTER, fontBold), cif.getCellInfo("IDIT", Element.ALIGN_CENTER, fontBold), cif.getCellInfo("Difference", Element.ALIGN_CENTER, fontBold) }, { cif.getCellInfo("Estate/Gift Taxable:"), cif.getCellInfo(dollar.format(f), Element.ALIGN_CENTER, fontBold), cif.getCellInfo(dollar.format(note) + " **", Element.ALIGN_CENTER, fontBold), cif.getCellInfo(dollar.format(f - note), Element.ALIGN_CENTER, fontBold) }, { cif.getCellInfo("Total Estate/Gift Taxes:"), cif.getCellInfo(dollar.format(t), Element.ALIGN_CENTER, fontBRed), cif.getCellInfo(dollar.format(noteTax), Element.ALIGN_CENTER, fontBRed), cif.getCellInfo(dollar.format(t - noteTax), Element.ALIGN_CENTER, fontBRed), }, { cif.getCellInfo("Life Insurance:"), cif.getCellInfo("0", Element.ALIGN_CENTER, fontBGreen), cif.getCellInfo( dollar.format(sidit.getLifeDeathBenefit()), Element.ALIGN_CENTER, fontBGreen), cif.getCellInfo( dollar.format(sidit.getLifeDeathBenefit()), Element.ALIGN_CENTER, fontBGreen), }, { cif.getCellInfo("Total to Family"), cif.getCellInfo(dollar.format(result), Element.ALIGN_CENTER, fontBGreen), cif.getCellInfo( dollar.format(balance + noteValueToFamily), Element.ALIGN_CENTER, fontBGreen), cif.getCellInfo( dollar.format((balance + noteValueToFamily) - result), Element.ALIGN_CENTER, fontBGreen), }, }; // Do the chart DefaultCategoryDataset dataSet = new DefaultCategoryDataset(); String series1 = "Keep in Estate"; String series2 = "IDIT"; String cat1 = "Estate Taxes"; String cat2 = "Total to Family"; dataSet.addValue(t, series1, cat1); dataSet.addValue(noteTax, series2, cat1); dataSet.addValue(result, series1, cat2); dataSet.addValue(balance + noteValueToFamily, series2, cat2); BarChart barChart = new BarChart(); barChart.setTitle("IDIT Comparison"); barChart.setDataSet(dataSet); Rectangle barRect = new Rectangle(prctLRight); barRect.setRight(barRect.getRight() + _1_2TH); barChart.setRect(barRect); barChart.generateBarChart(); barChart.setSeriesColor(new Color(0xff0000), new Color(0x00ff00)); barChart.setColor(0, Color.red); barChart.setColor(1, Color.green); barChart.setLablesOff(true); Image img = barChart.getBarChartImage(); drawDiagram(img, barRect, 0, 72); table.setTableData(cellData); table.drawTable(); drawLabel( "** The value(s) of the note is kept inside the taxable estate.", prctBottom, "GARA.TTF", new Color(64, 64, 64), 9, LBL_LEFT, LBL_BOTTOM); }