|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.core.io.AbstractPdfProclet
adams.core.io.HeadlinePdfProclet
public class HeadlinePdfProclet
Adds a simple headline, but no file content.
Valid options are:-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-page-break-before (property: pageBreakBefore) If true, then a page-break is added before the content of the file is inserted.
-page-break-after (property: pageBreakAfter) If true, then a page-break is added after the content of the file is inserted.
-num-files <int> (property: numFilesPerPage) The number of files to put on a page before adding an automatic page break; use -1 for unlimited. default: -1 minimum: -1
-add-filename (property: addFilename) Whether to add the file name before the actual file content as separate paragraph.
-font-filename <adams.core.io.PdfFont> (property: fontFilename) The font to use for printing the file name header. default: Helvetica-Bold-12
-color-filename <java.awt.Color> (property: colorFilename) The color to use for printing the file name header. default: #000000
-headline <adams.core.base.BaseText> (property: headline) The headline to add, can be multi-line. default: Fill in headline
-font-headline <adams.core.io.PdfFont> (property: fontHeadline) The font to use for the headline. default: Helvetica-Bold-14
-color-headline <java.awt.Color> (property: colorHeadline) The color to use for the headline. default: #000000
-extension <adams.core.base.BaseString> [-extension ...] (property: extensions) The file extension(s) that the processor will be used for. default: *
-first-page-only (property: firstPageOnly) If set to true, then the headline is only added to the first page.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class adams.core.io.AbstractPdfProclet |
|---|
AbstractPdfProclet.DocumentState |
| Field Summary | |
|---|---|
protected Color |
m_ColorHeadline
the color for the headline. |
protected BaseString[] |
m_Extensions
the file extensions. |
protected boolean |
m_FirstPageOnly
whether to add it only on the first page. |
protected PdfFont |
m_FontHeadline
the font for the headline. |
protected BaseText |
m_Headline
the headline to add. |
| Fields inherited from class adams.core.io.AbstractPdfProclet |
|---|
m_AddFilename, m_ColorFilename, m_FontFilename, m_NumFilesPerPage, m_PageBreakAfter, m_PageBreakBefore, MATCH_ALL_EXTENSION |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
HeadlinePdfProclet()
|
|
| Method Summary | |
|---|---|
boolean |
canProcess(AbstractPdfProclet.DocumentState state,
File file)
Whether the processor can handle this particular file. |
String |
colorHeadlineTipText()
Returns the tip text for this property. |
void |
defineOptions()
Adds options to the internal list of options. |
protected boolean |
doProcess(com.itextpdf.text.Document doc,
AbstractPdfProclet.DocumentState state,
File file)
The actual processing of the document. |
String |
extensionsTipText()
Returns the tip text for this property. |
String |
firstPageOnlyTipText()
Returns the tip text for this property. |
String |
fontHeadlineTipText()
Returns the tip text for this property. |
Color |
getColorHeadline()
Returns the color to use for the headline. |
BaseString[] |
getExtensions()
Returns the extensions that the processor can process. |
boolean |
getFirstPageOnly()
Returns the whether to add the headline only on the first page. |
PdfFont |
getFontHeadline()
Returns the font to use for the headline. |
BaseText |
getHeadline()
Returns the headline to add. |
String |
globalInfo()
Returns a short description of the writer. |
String |
headlineTipText()
Returns the tip text for this property. |
void |
setColorHeadline(Color value)
Sets the color to use for the headline. |
void |
setExtensions(BaseString[] value)
Sets the extensions that the processor can process. |
void |
setFirstPageOnly(boolean value)
Sets the whether to add the headline only on the first page. |
void |
setFontHeadline(PdfFont value)
Sets the font to use for the headline. |
void |
setHeadline(BaseText value)
Sets the headline to add. |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut, sizeOf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected BaseText m_Headline
protected PdfFont m_FontHeadline
protected Color m_ColorHeadline
protected BaseString[] m_Extensions
protected boolean m_FirstPageOnly
| Constructor Detail |
|---|
public HeadlinePdfProclet()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractPdfProcletpublic void setHeadline(BaseText value)
value - the headlinepublic BaseText getHeadline()
public String headlineTipText()
public void setFontHeadline(PdfFont value)
value - the fontpublic PdfFont getFontHeadline()
public String fontHeadlineTipText()
public void setColorHeadline(Color value)
value - the colorpublic Color getColorHeadline()
public String colorHeadlineTipText()
public BaseString[] getExtensions()
getExtensions in class AbstractPdfProcletpublic void setExtensions(BaseString[] value)
setExtensions in interface VariableFileExtensionPdfProcletvalue - the extensions (no dot)public String extensionsTipText()
extensionsTipText in interface VariableFileExtensionPdfProcletpublic void setFirstPageOnly(boolean value)
value - if true then the headline is only added on the first pagepublic boolean getFirstPageOnly()
public String firstPageOnlyTipText()
public boolean canProcess(AbstractPdfProclet.DocumentState state,
File file)
canProcess in class AbstractPdfProcletstate - the document statefile - the file to check
protected boolean doProcess(com.itextpdf.text.Document doc,
AbstractPdfProclet.DocumentState state,
File file)
throws Exception
doProcess in class AbstractPdfProcletdoc - the PDF document to add the file content tostate - the current document statefile - the file to add
Exception - if something goes wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||