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 int
m_NumFilesPerPage
the number of files per page.protected boolean
m_PageBreakAfter
whether to add a page-break after adding the file.protected boolean
m_PageBreakBefore
whether 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 void
defineOptions()
Adds options to the internal list of options.int
getNumFilesPerPage()
Returns the number of files to put on a single page.boolean
getPageBreakAfter()
Returns whether a page break is added after the file is inserted.boolean
getPageBreakBefore()
Returns whether a page break is added before the file is inserted.String
numFilesPerPageTipText()
Returns the tip text for this property.String
pageBreakAfterTipText()
Returns the tip text for this property.String
pageBreakBeforeTipText()
Returns the tip text for this property.protected boolean
postProcess(PDFGenerator generator, File file)
For post-processing the document.protected boolean
postProcess(PDFGenerator generator, Object obj)
For post-processing the document.protected boolean
preProcess(PDFGenerator generator, File file)
For pre-processing the document.protected boolean
preProcess(PDFGenerator generator, Object obj)
For pre-processing the document.void
setNumFilesPerPage(int value)
Sets the number of files per page.void
setPageBreakAfter(boolean value)
Whether to add a page break after the file is inserted.void
setPageBreakBefore(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:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractPdfProcletWithFilenameOutput
-
setPageBreakBefore
public void setPageBreakBefore(boolean value)
Whether to add a page break before the file is inserted.- Specified by:
setPageBreakBefore
in 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:
getPageBreakBefore
in 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:
pageBreakBeforeTipText
in 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:
setPageBreakAfter
in 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:
getPageBreakAfter
in 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:
pageBreakAfterTipText
in 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:
setNumFilesPerPage
in interfacePdfProcletWithPageBreaks
- Parameters:
value
- the number of files
-
getNumFilesPerPage
public int getNumFilesPerPage()
Returns the number of files to put on a single page.- Specified by:
getNumFilesPerPage
in interfacePdfProcletWithPageBreaks
- Returns:
- the number of files
-
numFilesPerPageTipText
public String numFilesPerPageTipText()
Returns the tip text for this property.- Specified by:
numFilesPerPageTipText
in 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:
preProcess
in 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:
postProcess
in 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:
preProcess
in 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:
postProcess
in classAbstractPdfProclet
- Parameters:
generator
- the contextobj
- the object to add- Returns:
- true if successfully added
- Throws:
Exception
- if something goes wrong
-
-