Class DocumentState
- java.lang.Object
-
- adams.flow.transformer.pdfproclet.DocumentState
-
- All Implemented Interfaces:
Serializable
public class DocumentState extends Object implements Serializable
Container class for storing state information about the document currently being processed.- Version:
- $Revision: 13473 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_CurrentFiles
the files added since last page break.protected boolean
m_NewPageAdded
whether a new page got added.protected int
m_TotalFiles
the files added so far.
-
Constructor Summary
Constructors Constructor Description DocumentState()
Initializes the state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFile()
Increments the file counters.void
contentAdded()
Stores that content was added.boolean
isNewPage()
Returns whether a new page was just added.boolean
newPage(com.itextpdf.text.Document doc)
Adds a new page only if none has been added so far.void
newPageAdded()
Stores that a new page got added.int
numCurrentFiles()
Returns the number of files that have been added since the last page break.int
numTotalFiles()
Returns the number of files that have been added so far.void
resetCurrentFiles()
Resets the counter for the current files.String
toString()
Returns a short representation of the document state.
-
-
-
Method Detail
-
newPage
public boolean newPage(com.itextpdf.text.Document doc)
Adds a new page only if none has been added so far.- Parameters:
doc
- the document to add the page to- Returns:
- true if successfully added (or not necessary)
-
newPageAdded
public void newPageAdded()
Stores that a new page got added.
-
contentAdded
public void contentAdded()
Stores that content was added.
-
isNewPage
public boolean isNewPage()
Returns whether a new page was just added.- Returns:
- true if a new page was just added
-
addFile
public void addFile()
Increments the file counters.
-
resetCurrentFiles
public void resetCurrentFiles()
Resets the counter for the current files.
-
numTotalFiles
public int numTotalFiles()
Returns the number of files that have been added so far.- Returns:
- the number of files
-
numCurrentFiles
public int numCurrentFiles()
Returns the number of files that have been added since the last page break.- Returns:
- the number of files
-
-