Class AbstractPdfProcletWithPageBreaks
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.pdfproclet.AbstractPdfProclet
-
- adams.flow.transformer.pdfproclet.AbstractPdfProcletWithFilenameOutput
-
- adams.flow.transformer.pdfproclet.AbstractPdfProcletWithPageBreaks
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,PdfProclet,PdfProcletWithFilenameOutput,PdfProcletWithPageBreaks,Serializable
- Direct Known Subclasses:
AbstractSpreadSheetPdfProclet,Image,PlainText
public abstract class AbstractPdfProcletWithPageBreaks extends AbstractPdfProcletWithFilenameOutput implements PdfProcletWithPageBreaks
Ancestor for processors handle page breaks.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_NumFilesPerPagethe number of files per page.protected booleanm_PageBreakAfterwhether to add a page-break after adding the file.protected booleanm_PageBreakBeforewhether to add a page-break before adding the file.-
Fields inherited from class adams.flow.transformer.pdfproclet.AbstractPdfProcletWithFilenameOutput
m_AddFilename, m_ColorFilename, m_FontFilename
-
Fields inherited from class adams.flow.transformer.pdfproclet.AbstractPdfProclet
m_RegExpFilename, MATCH_ALL_EXTENSION
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractPdfProcletWithPageBreaks()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.intgetNumFilesPerPage()Returns the number of files to put on a single page.booleangetPageBreakAfter()Returns whether a page break is added after the file is inserted.booleangetPageBreakBefore()Returns whether a page break is added before the file is inserted.StringnumFilesPerPageTipText()Returns the tip text for this property.StringpageBreakAfterTipText()Returns the tip text for this property.StringpageBreakBeforeTipText()Returns the tip text for this property.protected booleanpostProcess(PDFGenerator generator, File file)For post-processing the document.protected booleanpostProcess(PDFGenerator generator, Object obj)For post-processing the document.protected booleanpreProcess(PDFGenerator generator, File file)For pre-processing the document.protected booleanpreProcess(PDFGenerator generator, Object obj)For pre-processing the document.voidsetNumFilesPerPage(int value)Sets the number of files per page.voidsetPageBreakAfter(boolean value)Whether to add a page break after the file is inserted.voidsetPageBreakBefore(boolean value)Whether to add a page break before the file is inserted.-
Methods inherited from class adams.flow.transformer.pdfproclet.AbstractPdfProcletWithFilenameOutput
addFilename, addFilenameTipText, colorFilenameTipText, fontFilenameTipText, getAddFilename, getColorFilename, getFontFilename, setAddFilename, setColorFilename, setFontFilename
-
Methods inherited from class adams.flow.transformer.pdfproclet.AbstractPdfProclet
addColumnTextAt, addElement, canProcess, canProcess, doProcess, doProcess, getExtensions, getRegExpFilename, process, process, regExpFilenameTipText, setRegExpFilename
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.flow.transformer.pdfproclet.PdfProclet
canProcess, canProcess, getExtensions, getRegExpFilename, process, process, regExpFilenameTipText, setRegExpFilename
-
-
-
-
Field Detail
-
m_PageBreakBefore
protected boolean m_PageBreakBefore
whether to add a page-break before adding the file.
-
m_PageBreakAfter
protected boolean m_PageBreakAfter
whether to add a page-break after adding the file.
-
m_NumFilesPerPage
protected int m_NumFilesPerPage
the number of files per page.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractPdfProcletWithFilenameOutput
-
setPageBreakBefore
public void setPageBreakBefore(boolean value)
Whether to add a page break before the file is inserted.- Specified by:
setPageBreakBeforein interfacePdfProcletWithPageBreaks- Parameters:
value- if true then a page-break is added before the file is inserted
-
getPageBreakBefore
public boolean getPageBreakBefore()
Returns whether a page break is added before the file is inserted.- Specified by:
getPageBreakBeforein interfacePdfProcletWithPageBreaks- Returns:
- true if a page break is added before the file is inserted
-
pageBreakBeforeTipText
public String pageBreakBeforeTipText()
Returns the tip text for this property.- Specified by:
pageBreakBeforeTipTextin interfacePdfProcletWithPageBreaks- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPageBreakAfter
public void setPageBreakAfter(boolean value)
Whether to add a page break after the file is inserted.- Specified by:
setPageBreakAfterin interfacePdfProcletWithPageBreaks- Parameters:
value- if true then a page-break is added after the file is inserted
-
getPageBreakAfter
public boolean getPageBreakAfter()
Returns whether a page break is added after the file is inserted.- Specified by:
getPageBreakAfterin interfacePdfProcletWithPageBreaks- Returns:
- true if a page break is added after the file is inserted
-
pageBreakAfterTipText
public String pageBreakAfterTipText()
Returns the tip text for this property.- Specified by:
pageBreakAfterTipTextin interfacePdfProcletWithPageBreaks- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setNumFilesPerPage
public void setNumFilesPerPage(int value)
Sets the number of files per page.- Specified by:
setNumFilesPerPagein interfacePdfProcletWithPageBreaks- Parameters:
value- the number of files
-
getNumFilesPerPage
public int getNumFilesPerPage()
Returns the number of files to put on a single page.- Specified by:
getNumFilesPerPagein interfacePdfProcletWithPageBreaks- Returns:
- the number of files
-
numFilesPerPageTipText
public String numFilesPerPageTipText()
Returns the tip text for this property.- Specified by:
numFilesPerPageTipTextin interfacePdfProcletWithPageBreaks- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
preProcess
protected boolean preProcess(PDFGenerator generator, File file) throws Exception
For pre-processing the document.- Overrides:
preProcessin classAbstractPdfProclet- Parameters:
generator- the contextfile- the file to add- Returns:
- true if successfully added
- Throws:
Exception- if something goes wrong
-
postProcess
protected boolean postProcess(PDFGenerator generator, File file) throws Exception
For post-processing the document.- Overrides:
postProcessin classAbstractPdfProclet- Parameters:
generator- the contextfile- the file to add- Returns:
- true if successfully added
- Throws:
Exception- if something goes wrong
-
preProcess
protected boolean preProcess(PDFGenerator generator, Object obj) throws Exception
For pre-processing the document.- Overrides:
preProcessin classAbstractPdfProclet- Parameters:
generator- the contextobj- the object to add- Returns:
- true if successfully added
- Throws:
Exception- if something goes wrong
-
postProcess
protected boolean postProcess(PDFGenerator generator, Object obj) throws Exception
For post-processing the document.- Overrides:
postProcessin classAbstractPdfProclet- Parameters:
generator- the contextobj- the object to add- Returns:
- true if successfully added
- Throws:
Exception- if something goes wrong
-
-