com.openindex.openestate.tool.agency.utils
Class PdfBuilder

java.lang.Object
  extended by com.openindex.openestate.tool.agency.utils.PdfBuilder
Direct Known Subclasses:
PdfExposeDetailedBuilder, PdfExposeShortBuilder

public abstract class PdfBuilder
extends Object

PdfBuilder.
$Id: PdfBuilder.java 1829 2012-10-14 14:24:52Z andy $

Author:
Andreas Rudolph

Field Summary
protected  AgencyAgent agent
           
protected  com.lowagie.text.Font bodyFontBold
           
protected  com.lowagie.text.Font bodyFontH1
           
protected  com.lowagie.text.Font bodyFontH2
           
protected  com.lowagie.text.Font bodyFontH3
           
protected  com.lowagie.text.Font bodyFontNormal
           
protected  com.lowagie.text.Font bodyFontSmall
           
protected  Color bodyHeadBgColor
           
protected  Color bodyHeadFgColor
           
protected  Color bodyTextBgColor
           
protected  Color bodyTextFgColor
           
protected  Color borderColor
           
protected  boolean encryptionAccessibilityAllowed
           
protected  boolean encryptionCopyingAllowed
           
protected  boolean encryptionEnabled
           
protected  String encryptionPassword
           
protected  boolean encryptionPrintingAllowed
           
protected  Color footerTextFgColor
           
protected  Color headerTextFgColor
           
protected static float MARGIN_BOTTOM
           
protected static float MARGIN_LEFT
           
protected static float MARGIN_RIGHT
           
protected static float MARGIN_TOP
           
protected  Date now
           
protected  List<Integer> pageBreakBeforeRow
           
protected  List<Integer> pageBreakIfNextRowNotFits
           
protected  PdfSetup pdfSetup
           
 
Constructor Summary
protected PdfBuilder()
           
 
Method Summary
protected  void buildTableHead(com.lowagie.text.pdf.PdfPTable table, int index, String headline)
           
protected  void buildTableHead2(com.lowagie.text.pdf.PdfPTable table, int index, int pos, String headline)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, com.lowagie.text.Paragraph paragraph)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, com.lowagie.text.Paragraph paragraph, float margin)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String txt)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String txt, float size)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String txt, float size, int align)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String txt, int style)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String txt, int style, float size)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String txt, int style, float size, int align)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String txt, int style, int align)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String key, com.lowagie.text.Paragraph value)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String key, com.lowagie.text.pdf.PdfPCell value)
           
protected  void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String key, String value)
           
protected  void buildTemplate(com.lowagie.text.pdf.PdfTemplate tpl, float width, float height, int page)
           
abstract  AgencySetupPdfFormPanel createSetupPanel()
           
 ImmoToolTask<File> createTask(AgencyEstate estate)
          Erzeugt einen Task zur PDF-Erzeugung.
 ImmoToolTask<File> createTask(AgencyEstate estate, File destFile)
          Erzeugt einen Task zur PDF-Erzeugung.
abstract  ImmoToolTask<File> createTask(AgencyEstate estate, File destFile, boolean silent)
          Erzeugt einen Task zur PDF-Erzeugung.
abstract  void generatePdf(AgencyEstate estate, OutputStream output)
           
protected  void generateTable(com.lowagie.text.Document document, com.lowagie.text.pdf.PdfPTable table, com.lowagie.text.pdf.PdfReader templateReader, com.lowagie.text.Rectangle pageSize, OutputStream output)
           
static com.lowagie.text.Font getMatchingFont(String txt, float maxWidth, float maxHeight, com.lowagie.text.Font baseFont, float multipliedLeading)
           
static com.lowagie.text.Font getMatchingFont(String txt, float maxWidth, float maxHeight, com.lowagie.text.Font baseFont, float multipliedLeading, char[] separators)
           
static com.lowagie.text.Font getMatchingFont(String txt, float maxWidth, com.lowagie.text.Font baseFont)
           
abstract  String getName()
           
 Locale getOpenEstateLocale()
           
abstract  String getTitle()
           
protected  boolean isFooterPageNumberPrinted()
           
protected  boolean isFooterTimestampPrinted()
           
protected  boolean isFooterWebsitePrinted()
           
static Map<String,PdfBuilder> listAvailableBuilders()
           
 void load(PdfSetup setup)
           
protected  com.lowagie.text.Font registeredFont()
           
protected  com.lowagie.text.Font registeredFont(float size, int style, Color color)
           
protected  void registerFonts()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MARGIN_TOP

protected static final float MARGIN_TOP
See Also:
Constant Field Values

MARGIN_BOTTOM

protected static final float MARGIN_BOTTOM
See Also:
Constant Field Values

MARGIN_LEFT

protected static final float MARGIN_LEFT
See Also:
Constant Field Values

MARGIN_RIGHT

protected static final float MARGIN_RIGHT
See Also:
Constant Field Values

agent

protected AgencyAgent agent

now

protected Date now

pdfSetup

protected PdfSetup pdfSetup

bodyFontH1

protected com.lowagie.text.Font bodyFontH1

bodyFontH2

protected com.lowagie.text.Font bodyFontH2

bodyFontH3

protected com.lowagie.text.Font bodyFontH3

bodyFontBold

protected com.lowagie.text.Font bodyFontBold

bodyFontNormal

protected com.lowagie.text.Font bodyFontNormal

bodyFontSmall

protected com.lowagie.text.Font bodyFontSmall

pageBreakBeforeRow

protected List<Integer> pageBreakBeforeRow

pageBreakIfNextRowNotFits

protected List<Integer> pageBreakIfNextRowNotFits

borderColor

protected Color borderColor

bodyHeadBgColor

protected Color bodyHeadBgColor

bodyHeadFgColor

protected Color bodyHeadFgColor

bodyTextBgColor

protected Color bodyTextBgColor

bodyTextFgColor

protected Color bodyTextFgColor

headerTextFgColor

protected Color headerTextFgColor

footerTextFgColor

protected Color footerTextFgColor

encryptionEnabled

protected boolean encryptionEnabled

encryptionPassword

protected String encryptionPassword

encryptionAccessibilityAllowed

protected boolean encryptionAccessibilityAllowed

encryptionCopyingAllowed

protected boolean encryptionCopyingAllowed

encryptionPrintingAllowed

protected boolean encryptionPrintingAllowed
Constructor Detail

PdfBuilder

protected PdfBuilder()
Method Detail

buildTemplate

protected void buildTemplate(com.lowagie.text.pdf.PdfTemplate tpl,
                             float width,
                             float height,
                             int page)
                      throws ImmoToolDbException,
                             IOException,
                             com.lowagie.text.DocumentException
Throws:
ImmoToolDbException
IOException
com.lowagie.text.DocumentException

buildTableHead

protected void buildTableHead(com.lowagie.text.pdf.PdfPTable table,
                              int index,
                              String headline)

buildTableHead2

protected void buildTableHead2(com.lowagie.text.pdf.PdfPTable table,
                               int index,
                               int pos,
                               String headline)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             String txt)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             String txt,
                             int style)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             String txt,
                             int style,
                             int align)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             String txt,
                             float size)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             String txt,
                             float size,
                             int align)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             String txt,
                             int style,
                             float size)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             String txt,
                             int style,
                             float size,
                             int align)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             com.lowagie.text.Paragraph paragraph)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             com.lowagie.text.Paragraph paragraph,
                             float margin)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             String key,
                             String value)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             String key,
                             com.lowagie.text.Paragraph value)

buildTableRow

protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table,
                             String key,
                             com.lowagie.text.pdf.PdfPCell value)

createSetupPanel

public abstract AgencySetupPdfFormPanel createSetupPanel()

createTask

public ImmoToolTask<File> createTask(AgencyEstate estate)
Erzeugt einen Task zur PDF-Erzeugung.

Parameters:
estate - Immobilie
Returns:
Task

createTask

public ImmoToolTask<File> createTask(AgencyEstate estate,
                                     File destFile)
Erzeugt einen Task zur PDF-Erzeugung.

Parameters:
estate - Immobilie
destFile - Speicherdatei, wenn null angegegben wurde, öffnet sich ein Dialogfenster zur Wahl des Speicherortes
Returns:
Task

createTask

public abstract ImmoToolTask<File> createTask(AgencyEstate estate,
                                              File destFile,
                                              boolean silent)
Erzeugt einen Task zur PDF-Erzeugung.

Parameters:
estate - Immobilie
destFile - Speicherdatei, wenn null angegegben wurde, öffnet sich ein Dialogfenster zur Wahl des Speicherortes
silent - stille Ausführung
Returns:
Task

generatePdf

public abstract void generatePdf(AgencyEstate estate,
                                 OutputStream output)
                          throws ImmoToolException
Throws:
ImmoToolException

generateTable

protected void generateTable(com.lowagie.text.Document document,
                             com.lowagie.text.pdf.PdfPTable table,
                             com.lowagie.text.pdf.PdfReader templateReader,
                             com.lowagie.text.Rectangle pageSize,
                             OutputStream output)
                      throws ImmoToolException
Throws:
ImmoToolException

getMatchingFont

public static com.lowagie.text.Font getMatchingFont(String txt,
                                                    float maxWidth,
                                                    com.lowagie.text.Font baseFont)

getMatchingFont

public static com.lowagie.text.Font getMatchingFont(String txt,
                                                    float maxWidth,
                                                    float maxHeight,
                                                    com.lowagie.text.Font baseFont,
                                                    float multipliedLeading)

getMatchingFont

public static com.lowagie.text.Font getMatchingFont(String txt,
                                                    float maxWidth,
                                                    float maxHeight,
                                                    com.lowagie.text.Font baseFont,
                                                    float multipliedLeading,
                                                    char[] separators)

getName

public abstract String getName()

getOpenEstateLocale

public Locale getOpenEstateLocale()

getTitle

public abstract String getTitle()

isFooterPageNumberPrinted

protected boolean isFooterPageNumberPrinted()

isFooterTimestampPrinted

protected boolean isFooterTimestampPrinted()

isFooterWebsitePrinted

protected boolean isFooterWebsitePrinted()

listAvailableBuilders

public static Map<String,PdfBuilder> listAvailableBuilders()

load

public void load(PdfSetup setup)

registerFonts

protected void registerFonts()

registeredFont

protected com.lowagie.text.Font registeredFont()

registeredFont

protected com.lowagie.text.Font registeredFont(float size,
                                               int style,
                                               Color color)


Copyright © 2012 OpenEstate. All Rights Reserved.