Class AbstractPdfExpose
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,String>
-
- com.openindex.openestate.tool.agency.expose.AbstractExpose
-
- com.openindex.openestate.tool.agency.expose.AbstractPdfExpose
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,String>
- Direct Known Subclasses:
PdfDetailedExpose
,PdfShortExpose
,PdfVitrineExpose
public abstract class AbstractPdfExpose extends AbstractExpose
AbstractPdfExpose.- Author:
- Andreas Rudolph
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openindex.openestate.tool.agency.expose.AbstractExpose
AbstractExpose.HorizontalAlign, AbstractExpose.Orientation
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
BASE_FONT
protected com.lowagie.text.pdf.BaseFont
baseFont
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 DateFormat
dateFormat
protected static float
DEFAULT_MARGIN_BOTTOM
protected static float
DEFAULT_MARGIN_LEFT
protected static float
DEFAULT_MARGIN_RIGHT
protected static float
DEFAULT_MARGIN_TOP
protected Color
footerTextFgColor
protected Color
headerTextFgColor
protected List<Integer>
pageBreakBeforeRow
protected List<Integer>
pageBreakIfNextRowNotFits
-
Fields inherited from class com.openindex.openestate.tool.agency.expose.AbstractExpose
dbConnection, dbExtension, dbLanguageMap, locale, now, orientation
-
-
Constructor Summary
Constructors Constructor Description AbstractPdfExpose()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buildDocument(com.lowagie.text.Document document, com.lowagie.text.pdf.PdfPTable table, com.lowagie.text.pdf.PdfReader templateReader, com.lowagie.text.Rectangle pageSize, OutputStream output)
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, 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, com.lowagie.text.Phrase 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, int pageCount, int currentRow)
protected com.lowagie.text.pdf.PdfWriter
createWriter(com.lowagie.text.Document document, OutputStream output)
Color
getBodyHeadBgColor()
Color
getBodyHeadFgColor()
AbstractExpose.HorizontalAlign
getBodyTextAlignment()
Color
getBodyTextBgColor()
Color
getBodyTextFgColor()
Color
getBorderColor()
String
getEncryptionPassword()
AbstractExpose.HorizontalAlign
getFooterTextAlignment()
Color
getFooterTextFgColor()
String
getHeaderTextCustomLine1()
String
getHeaderTextCustomLine2()
String
getHeaderTextCustomLine3()
Color
getHeaderTextFgColor()
protected float
getMarginBottom(int page)
protected float
getMarginLeft(int page)
protected float
getMarginRight(int page)
protected float
getMarginTop(int page)
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)
protected int
getPageNumber(int row)
protected static com.lowagie.text.Font
getRegisteredFont()
protected static com.lowagie.text.Font
getRegisteredFont(float size, int style)
protected static com.lowagie.text.Font
getRegisteredFont(float size, int style, Color color)
protected static com.lowagie.text.Font
getRegisteredFont(String name)
protected static com.lowagie.text.Font
getRegisteredFont(String name, float size, int style)
protected static com.lowagie.text.Font
getRegisteredFont(String name, float size, int style, Color color)
protected void
init(ImmoToolProject project, Connection dbConnection)
void
initDefaults()
boolean
isBodyHeadNumbered()
boolean
isEncryption()
boolean
isEncryptionAccessibilityAllowed()
boolean
isEncryptionCopyingAllowed()
boolean
isEncryptionPrintingAllowed()
boolean
isFooter()
boolean
isFooterPageNumber()
boolean
isFooterTimestamp()
boolean
isFooterWebsite()
boolean
isHeader()
boolean
isHeaderLogo()
boolean
isHeaderTextCustom()
protected boolean
registerFont(String name, File fontFile)
protected boolean
registerFont(String name, InputStream fontStream)
protected void
registerFonts()
void
setBodyHeadBgColor(Color val)
void
setBodyHeadFgColor(Color val)
void
setBodyHeadNumbered(boolean val)
void
setBodyTextAlignment(AbstractExpose.HorizontalAlign val)
void
setBodyTextBgColor(Color val)
void
setBodyTextFgColor(Color val)
void
setBorderColor(Color val)
void
setEncryption(boolean val)
void
setEncryptionAccessibilityAllowed(boolean val)
void
setEncryptionCopyingAllowed(boolean val)
void
setEncryptionPassword(String val)
void
setEncryptionPrintingAllowed(boolean val)
void
setFooter(boolean val)
void
setFooterPageNumber(boolean val)
void
setFooterTextAlignment(AbstractExpose.HorizontalAlign val)
void
setFooterTextFgColor(Color val)
void
setFooterTimestamp(boolean val)
void
setFooterWebsite(boolean val)
void
setHeader(boolean val)
void
setHeaderLogo(boolean val)
void
setHeaderTextCustom(boolean val)
void
setHeaderTextCustomLine1(String val)
void
setHeaderTextCustomLine2(String val)
void
setHeaderTextCustomLine3(String val)
void
setHeaderTextFgColor(Color val)
-
Methods inherited from class com.openindex.openestate.tool.agency.expose.AbstractExpose
build, createForm, finish, generate, generate, generate, generate, getAgent, getAgentLogo, getAgentLogoImage, getEstateContact, getEstateFileDownload, getEstateFiles, getEstateLinks, getEstateObject, getExpose, getExposeFile, getExposes, getLocale, getName, getOrientation, getPublishAddress, getPublishFiles, getPublishLinks, getPublishPrices, getResolution, getSupportedLocales, getTemplateFile, getTemplateId, getTemporaryTemplateFile, getTitle, isShowContact, isTemplate, saveToDatabase, setLocale, setOrientation, setPublishAddress, setPublishFiles, setPublishLinks, setPublishPrices, setResolution, setShowContact, setTemplate, setTemplateId, setTemporaryTemplate
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Field Detail
-
BASE_FONT
protected static final String BASE_FONT
- See Also:
- Constant Field Values
-
DEFAULT_MARGIN_TOP
protected static final float DEFAULT_MARGIN_TOP
- See Also:
- Constant Field Values
-
DEFAULT_MARGIN_BOTTOM
protected static final float DEFAULT_MARGIN_BOTTOM
- See Also:
- Constant Field Values
-
DEFAULT_MARGIN_LEFT
protected static final float DEFAULT_MARGIN_LEFT
- See Also:
- Constant Field Values
-
DEFAULT_MARGIN_RIGHT
protected static final float DEFAULT_MARGIN_RIGHT
- See Also:
- Constant Field Values
-
dateFormat
protected DateFormat dateFormat
-
baseFont
protected com.lowagie.text.pdf.BaseFont baseFont
-
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
-
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
-
-
Method Detail
-
buildDocument
protected void buildDocument(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 IOException, com.lowagie.text.DocumentException
- Throws:
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, String key, String value)
-
buildTableRow
protected void buildTableRow(com.lowagie.text.pdf.PdfPTable table, String key, com.lowagie.text.Phrase 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)
-
buildTemplate
protected void buildTemplate(com.lowagie.text.pdf.PdfTemplate tpl, float width, float height, int page, int pageCount, int currentRow) throws IOException, com.lowagie.text.DocumentException
- Throws:
IOException
com.lowagie.text.DocumentException
-
createWriter
protected com.lowagie.text.pdf.PdfWriter createWriter(com.lowagie.text.Document document, OutputStream output) throws com.lowagie.text.DocumentException
- Throws:
com.lowagie.text.DocumentException
-
getBodyHeadBgColor
public Color getBodyHeadBgColor()
-
getBodyHeadFgColor
public Color getBodyHeadFgColor()
-
getBodyTextAlignment
public AbstractExpose.HorizontalAlign getBodyTextAlignment()
-
getBodyTextBgColor
public Color getBodyTextBgColor()
-
getBodyTextFgColor
public Color getBodyTextFgColor()
-
getBorderColor
public Color getBorderColor()
-
getEncryptionPassword
public String getEncryptionPassword()
-
getFooterTextAlignment
public AbstractExpose.HorizontalAlign getFooterTextAlignment()
-
getFooterTextFgColor
public Color getFooterTextFgColor()
-
getHeaderTextCustomLine1
public String getHeaderTextCustomLine1()
-
getHeaderTextCustomLine2
public String getHeaderTextCustomLine2()
-
getHeaderTextCustomLine3
public String getHeaderTextCustomLine3()
-
getHeaderTextFgColor
public Color getHeaderTextFgColor()
-
getMarginBottom
protected float getMarginBottom(int page)
-
getMarginLeft
protected float getMarginLeft(int page)
-
getMarginRight
protected float getMarginRight(int page)
-
getMarginTop
protected float getMarginTop(int page)
-
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)
-
getPageNumber
protected int getPageNumber(int row)
-
getRegisteredFont
protected static com.lowagie.text.Font getRegisteredFont()
-
getRegisteredFont
protected static com.lowagie.text.Font getRegisteredFont(String name)
-
getRegisteredFont
protected static com.lowagie.text.Font getRegisteredFont(float size, int style)
-
getRegisteredFont
protected static com.lowagie.text.Font getRegisteredFont(String name, float size, int style)
-
getRegisteredFont
protected static com.lowagie.text.Font getRegisteredFont(float size, int style, Color color)
-
getRegisteredFont
protected static com.lowagie.text.Font getRegisteredFont(String name, float size, int style, Color color)
-
init
protected void init(ImmoToolProject project, Connection dbConnection) throws SQLException
- Overrides:
init
in classAbstractExpose
- Throws:
SQLException
-
initDefaults
public void initDefaults()
- Overrides:
initDefaults
in classAbstractExpose
-
isBodyHeadNumbered
public boolean isBodyHeadNumbered()
-
isEncryption
public boolean isEncryption()
-
isEncryptionAccessibilityAllowed
public boolean isEncryptionAccessibilityAllowed()
-
isEncryptionCopyingAllowed
public boolean isEncryptionCopyingAllowed()
-
isEncryptionPrintingAllowed
public boolean isEncryptionPrintingAllowed()
-
isFooter
public boolean isFooter()
-
isFooterPageNumber
public boolean isFooterPageNumber()
-
isFooterTimestamp
public boolean isFooterTimestamp()
-
isFooterWebsite
public boolean isFooterWebsite()
-
isHeader
public boolean isHeader()
-
isHeaderLogo
public boolean isHeaderLogo()
-
isHeaderTextCustom
public boolean isHeaderTextCustom()
-
registerFont
protected final boolean registerFont(String name, File fontFile) throws IOException
- Throws:
IOException
-
registerFont
protected final boolean registerFont(String name, InputStream fontStream) throws IOException
- Throws:
IOException
-
registerFonts
protected void registerFonts()
-
setBodyHeadBgColor
public void setBodyHeadBgColor(Color val)
-
setBodyHeadFgColor
public void setBodyHeadFgColor(Color val)
-
setBodyHeadNumbered
public void setBodyHeadNumbered(boolean val)
-
setBodyTextAlignment
public void setBodyTextAlignment(AbstractExpose.HorizontalAlign val)
-
setBodyTextBgColor
public void setBodyTextBgColor(Color val)
-
setBodyTextFgColor
public void setBodyTextFgColor(Color val)
-
setBorderColor
public void setBorderColor(Color val)
-
setEncryption
public void setEncryption(boolean val)
-
setEncryptionAccessibilityAllowed
public void setEncryptionAccessibilityAllowed(boolean val)
-
setEncryptionCopyingAllowed
public void setEncryptionCopyingAllowed(boolean val)
-
setEncryptionPassword
public void setEncryptionPassword(String val)
-
setEncryptionPrintingAllowed
public void setEncryptionPrintingAllowed(boolean val)
-
setFooter
public void setFooter(boolean val)
-
setFooterPageNumber
public void setFooterPageNumber(boolean val)
-
setFooterTextAlignment
public void setFooterTextAlignment(AbstractExpose.HorizontalAlign val)
-
setFooterTextFgColor
public void setFooterTextFgColor(Color val)
-
setFooterTimestamp
public void setFooterTimestamp(boolean val)
-
setFooterWebsite
public void setFooterWebsite(boolean val)
-
setHeader
public void setHeader(boolean val)
-
setHeaderLogo
public void setHeaderLogo(boolean val)
-
setHeaderTextCustom
public void setHeaderTextCustom(boolean val)
-
setHeaderTextCustomLine1
public void setHeaderTextCustomLine1(String val)
-
setHeaderTextCustomLine2
public void setHeaderTextCustomLine2(String val)
-
setHeaderTextCustomLine3
public void setHeaderTextCustomLine3(String val)
-
setHeaderTextFgColor
public void setHeaderTextFgColor(Color val)
-
-