Package org.jfree.layouting.output
Class AbstractOutputProcessor
- java.lang.Object
-
- org.jfree.layouting.output.AbstractOutputProcessor
-
- All Implemented Interfaces:
OutputProcessor
- Direct Known Subclasses:
AbstractPageableProcessor,ExcelOutputProcessor,FlowGraphicsOutputProcessor,FlowHtmlOutputProcessor,StreamingHtmlOutputProcessor,StreamingPlaintextOutputProcessor
public abstract class AbstractOutputProcessor extends java.lang.Object implements OutputProcessor
This base class configures the layouter for the normal DOM processing. The display model assumes, that all elements can be nested freely, without imposing any limitations at all. Using this as base process for text-processing document output (like RTF or OpenOffice-Writer) is a sure way to the hell of funny behaviour.- Author:
- Thomas Morgner
-
-
Field Summary
Fields Modifier and Type Field Description protected static intPROCESSING_CONTENTprotected static intPROCESSING_GLOBAL_CONTENTprotected static intPROCESSING_PAGES
-
Constructor Summary
Constructors Constructor Description AbstractOutputProcessor(org.pentaho.reporting.libraries.base.config.Configuration configuration)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description InputFeedcreateInputFeed(LayoutProcess layoutProcess)protected LogicalPageKeycreateLogicalPage(int width, int height)ModelBuildercreateModelBuilder(LayoutProcess layoutProcess)The model builder normalizes the input and builds the Display-Model.NormalizercreateNormalizer(LayoutProcess layoutProcess)Returns the content normalizer implementation for this OP.org.pentaho.reporting.libraries.base.config.ConfigurationgetConfiguration()DocumentContextgetDocumentContext()LogicalPageKeygetLogicalPage(int page)intgetLogicalPageCount()intgetPageCursor()protected intgetProcessingState()booleanisContentGeneratable()This flag indicates, whether the output processor has collected enough information to start the content generation.booleanisGlobalStateComputed()This flag indicates, whether the global content has been computed.booleanisPaginationFinished()Checks, whether the 'processingFinished' event had been received at least once.voidprocessContent(LogicalPageBox logicalPage)voidprocessDocumentMetaData(DocumentContext documentContext)protected voidprocessingContentFinished()voidprocessingFinished()Notifies the output processor, that the processing has been finished and that the input-feed received the last event.protected voidprocessingGlobalContentFinished()protected voidprocessingPagesFinished()protected abstract voidprocessPageContent(LogicalPageKey logicalPageKey, LogicalPageBox logicalPage)voidsetPageCursor(int pageCursor)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jfree.layouting.output.OutputProcessor
createRenderer, getMetaData
-
-
-
-
Field Detail
-
PROCESSING_GLOBAL_CONTENT
protected static final int PROCESSING_GLOBAL_CONTENT
- See Also:
- Constant Field Values
-
PROCESSING_PAGES
protected static final int PROCESSING_PAGES
- See Also:
- Constant Field Values
-
PROCESSING_CONTENT
protected static final int PROCESSING_CONTENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
isPaginationFinished
public boolean isPaginationFinished()
Checks, whether the 'processingFinished' event had been received at least once.- Specified by:
isPaginationFinishedin interfaceOutputProcessor- Returns:
-
processingFinished
public void processingFinished()
Notifies the output processor, that the processing has been finished and that the input-feed received the last event.- Specified by:
processingFinishedin interfaceOutputProcessor
-
processingContentFinished
protected void processingContentFinished()
-
getDocumentContext
public DocumentContext getDocumentContext()
-
processingPagesFinished
protected void processingPagesFinished()
-
processingGlobalContentFinished
protected void processingGlobalContentFinished()
-
getConfiguration
public org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
- Specified by:
getConfigurationin interfaceOutputProcessor
-
createInputFeed
public InputFeed createInputFeed(LayoutProcess layoutProcess)
- Specified by:
createInputFeedin interfaceOutputProcessor
-
createNormalizer
public Normalizer createNormalizer(LayoutProcess layoutProcess)
Returns the content normalizer implementation for this OP. The content normalizer is responsible for resolving the styles and for initiating the DOM building.- Specified by:
createNormalizerin interfaceOutputProcessor- Parameters:
layoutProcess- the layout process that governs all.- Returns:
-
createModelBuilder
public ModelBuilder createModelBuilder(LayoutProcess layoutProcess)
The model builder normalizes the input and builds the Display-Model. The DisplayModel enriches and normalizes the logical document model so that it is better suited for rendering.- Specified by:
createModelBuilderin interfaceOutputProcessor- Parameters:
layoutProcess- the layout process that governs all.- Returns:
-
getLogicalPageCount
public int getLogicalPageCount()
- Specified by:
getLogicalPageCountin interfaceOutputProcessor
-
getLogicalPage
public LogicalPageKey getLogicalPage(int page)
- Specified by:
getLogicalPagein interfaceOutputProcessor
-
createLogicalPage
protected LogicalPageKey createLogicalPage(int width, int height)
-
getPageCursor
public int getPageCursor()
- Specified by:
getPageCursorin interfaceOutputProcessor
-
setPageCursor
public void setPageCursor(int pageCursor)
- Specified by:
setPageCursorin interfaceOutputProcessor
-
isGlobalStateComputed
public boolean isGlobalStateComputed()
This flag indicates, whether the global content has been computed. Global content consists of global counters (except the pages counter) and derived information like table of contents, the global directory of images or tables etc. The global state must be computed before paginating can be attempted (if the output target is paginating at all).- Specified by:
isGlobalStateComputedin interfaceOutputProcessor- Returns:
- true, if the global state has been computed, false otherwise.
-
getProcessingState
protected int getProcessingState()
-
isContentGeneratable
public boolean isContentGeneratable()
This flag indicates, whether the output processor has collected enough information to start the content generation.- Specified by:
isContentGeneratablein interfaceOutputProcessor- Returns:
-
processContent
public final void processContent(LogicalPageBox logicalPage)
- Specified by:
processContentin interfaceOutputProcessor
-
processPageContent
protected abstract void processPageContent(LogicalPageKey logicalPageKey, LogicalPageBox logicalPage)
-
processDocumentMetaData
public void processDocumentMetaData(DocumentContext documentContext)
- Specified by:
processDocumentMetaDatain interfaceOutputProcessor
-
-