Class RecordingContentNormalizer
- java.lang.Object
-
- org.jfree.layouting.util.ChainingComponent
-
- org.jfree.layouting.normalizer.content.RecordingContentNormalizer
-
- All Implemented Interfaces:
Normalizer,StatefullComponent
public final class RecordingContentNormalizer extends ChainingComponent implements Normalizer
This class records all incoming calls and replays them later.- Author:
- Thomas Morgner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jfree.layouting.util.ChainingComponent
ChainingComponent.RecordedCall
-
-
Field Summary
-
Fields inherited from class org.jfree.layouting.util.ChainingComponent
STATE_DONE, STATE_ERROR, STATE_FRESH
-
-
Constructor Summary
Constructors Constructor Description RecordingContentNormalizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddText(java.lang.String text)Adds text content to the current element.voidclear()voidendDocument()Ends the document.voidendElement()Ends the current element.intgetElementDepth()RenderergetRenderer()Returns the renderer.StyleResolvergetStyleResolver()java.lang.StringgetText()voidhandlePageBreak(CSSValue pageName, PseudoPage[] pseudoPages)protected voidinvoke(java.lang.Object target, int methodId, java.lang.Object params)StatesaveState()voidstartDocument()Start document is the first call to the normalizer.voidstartElement(java.lang.String namespace, java.lang.String tag, AttributeMap attributes)Starts a new element.-
Methods inherited from class org.jfree.layouting.util.ChainingComponent
addCall, replay, retrieveRecordedCalls, setRecordedCalls
-
-
-
-
Method Detail
-
startDocument
public void startDocument()
Start document is the first call to the normalizer. At this point, all meta-data has been given and the document context is filled correctly. Starting the document also starts a new PageContext.- Specified by:
startDocumentin interfaceNormalizer- Throws:
NormalizationExceptionjava.io.IOException
-
startElement
public void startElement(java.lang.String namespace, java.lang.String tag, AttributeMap attributes)Starts a new element. The element uses the given namespace and tagname. The element's attributes are given as collection, each attribute is keyed with a namespace and attributename. The values contained in the attributes are not defined.- Specified by:
startElementin interfaceNormalizer- Parameters:
namespace-tag-attributes-- Throws:
NormalizationExceptionjava.io.IOException
-
addText
public void addText(java.lang.String text)
Adds text content to the current element.- Specified by:
addTextin interfaceNormalizer- Parameters:
text-- Throws:
NormalizationExceptionjava.io.IOException
-
endElement
public void endElement()
Ends the current element. The namespace and tagname are given for convienience.- Specified by:
endElementin interfaceNormalizer- Parameters:
namespace-tag-- Throws:
NormalizationExceptionjava.io.IOException
-
endDocument
public void endDocument()
Ends the document. No other events will be fired against this normalizer once this method has been called.- Specified by:
endDocumentin interfaceNormalizer- Throws:
NormalizationExceptionjava.io.IOException
-
invoke
protected void invoke(java.lang.Object target, int methodId, java.lang.Object params) throws java.lang.Exception- Specified by:
invokein classChainingComponent- Throws:
java.lang.Exception
-
clear
public void clear()
- Overrides:
clearin classChainingComponent
-
getElementDepth
public int getElementDepth()
-
saveState
public State saveState()
- Specified by:
saveStatein interfaceStatefullComponent
-
getText
public java.lang.String getText()
-
handlePageBreak
public void handlePageBreak(CSSValue pageName, PseudoPage[] pseudoPages)
- Specified by:
handlePageBreakin interfaceNormalizer
-
getRenderer
public Renderer getRenderer()
Returns the renderer. The renderer is the last step in the processing chain. The ModelBuilder and ContentGenerator steps are considered internal, as they may refeed the normalizer.- Specified by:
getRendererin interfaceNormalizer- Returns:
-
getStyleResolver
public StyleResolver getStyleResolver()
-
-