Class DefaultInputFeed
- java.lang.Object
-
- org.jfree.layouting.layouter.feed.DefaultInputFeed
-
- All Implemented Interfaces:
InputFeed,StatefullComponent
public class DefaultInputFeed extends java.lang.Object implements InputFeed
Creation-Date: 05.12.2005, 18:19:03- Author:
- Thomas Morgner
-
-
Field Summary
Fields Modifier and Type Field Description static intDOCUMENT_FINISHEDstatic intDOCUMENT_STARTINGstatic intELEMENT_ATTRIBUTESstatic intELEMENT_CONTENTstatic intELEMENT_EXPECTEDstatic intELEMENT_STARTEDstatic intMETA_EXPECTEDstatic intMETA_NODE_ATTRIBUTESstatic intMETA_NODE_STARTstatic intMETA_PROCESSING
-
Constructor Summary
Constructors Modifier Constructor Description DefaultInputFeed(LayoutProcess process)protectedDefaultInputFeed(LayoutProcess process, boolean init)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContent(java.lang.String text)voidaddDocumentAttribute(java.lang.String name, java.lang.Object attr)Adds document attributes.voidendDocument()voidendElement()voidendMetaInfo()voidendMetaNode()NormalizergetCurrentNormalizer()Warning; This method is needed internally, mess with it from the outside and you will run into trouble.NamespaceCollectiongetNamespaceCollection()NormalizergetNormalizer()protected LayoutProcessgetProcess()protected intgetState()voidhandlePageBreakEncountered(CSSValue pageName, PseudoPage[] pseudoPages)booleanisPagebreakEncountered()protected voidperformAddContent(java.lang.String text)protected voidperformAddDocumentAttribute(java.lang.String name, java.lang.Object attr)protected voidperformEndDocument()protected voidperformEndElement()protected voidperformEndMetaInfo()protected voidperformEndMetaNode()protected voidperformSetAttribute(java.lang.String namespace, java.lang.String name, java.lang.Object attr)protected voidperformSetMetaNodeAttribute(java.lang.String name, java.lang.Object attr)protected voidperformStartDocument()protected voidperformStartElement(java.lang.String namespace, java.lang.String name)protected voidperformStartMetaInfo()protected voidperformStartMetaNode()voidresetPageBreakFlag()StatesaveState()voidsetAttribute(java.lang.String namespace, java.lang.String name, java.lang.Object attr)voidsetMetaNodeAttribute(java.lang.String name, java.lang.Object attr)Defines an attribute for the meta-nodes.voidstartDocument()Starts the document processing.voidstartElement(java.lang.String namespace, java.lang.String name)voidstartMetaInfo()Signals, that meta-data follows.voidstartMetaNode()Starts a new meta-node structure.
-
-
-
Field Detail
-
DOCUMENT_STARTING
public static final int DOCUMENT_STARTING
- See Also:
- Constant Field Values
-
META_EXPECTED
public static final int META_EXPECTED
- See Also:
- Constant Field Values
-
META_PROCESSING
public static final int META_PROCESSING
- See Also:
- Constant Field Values
-
META_NODE_START
public static final int META_NODE_START
- See Also:
- Constant Field Values
-
META_NODE_ATTRIBUTES
public static final int META_NODE_ATTRIBUTES
- See Also:
- Constant Field Values
-
ELEMENT_EXPECTED
public static final int ELEMENT_EXPECTED
- See Also:
- Constant Field Values
-
ELEMENT_STARTED
public static final int ELEMENT_STARTED
- See Also:
- Constant Field Values
-
ELEMENT_ATTRIBUTES
public static final int ELEMENT_ATTRIBUTES
- See Also:
- Constant Field Values
-
ELEMENT_CONTENT
public static final int ELEMENT_CONTENT
- See Also:
- Constant Field Values
-
DOCUMENT_FINISHED
public static final int DOCUMENT_FINISHED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultInputFeed
public DefaultInputFeed(LayoutProcess process)
-
DefaultInputFeed
protected DefaultInputFeed(LayoutProcess process, boolean init)
-
-
Method Detail
-
resetPageBreakFlag
public void resetPageBreakFlag()
- Specified by:
resetPageBreakFlagin interfaceInputFeed
-
handlePageBreakEncountered
public void handlePageBreakEncountered(CSSValue pageName, PseudoPage[] pseudoPages) throws NormalizationException
- Specified by:
handlePageBreakEncounteredin interfaceInputFeed- Throws:
NormalizationException
-
isPagebreakEncountered
public boolean isPagebreakEncountered()
- Specified by:
isPagebreakEncounteredin interfaceInputFeed
-
startDocument
public final void startDocument()
Description copied from interface:InputFeedStarts the document processing. This is the first method to call. After calling this method, the meta-data should be fed into the inputfeed.- Specified by:
startDocumentin interfaceInputFeed
-
performStartDocument
protected void performStartDocument()
-
startMetaInfo
public final void startMetaInfo()
Description copied from interface:InputFeedSignals, that meta-data follows. Calling this method is only valid directly after startDocument has been called.- Specified by:
startMetaInfoin interfaceInputFeed
-
performStartMetaInfo
protected void performStartMetaInfo()
-
addDocumentAttribute
public final void addDocumentAttribute(java.lang.String name, java.lang.Object attr)Description copied from interface:InputFeedAdds document attributes. Document attributes hold object factories and document wide resources which appear only once.- Specified by:
addDocumentAttributein interfaceInputFeed
-
performAddDocumentAttribute
protected void performAddDocumentAttribute(java.lang.String name, java.lang.Object attr)
-
startMetaNode
public void startMetaNode()
Description copied from interface:InputFeedStarts a new meta-node structure. Meta-Nodes are used to hold content that can appear more than once (like stylesheet declarations). For now, only stylesheet declarations are defined as meta-node content; more content types will surely arise in the future. Calling this method is only valid after 'startMetaInfo' has been called.- Specified by:
startMetaNodein interfaceInputFeed
-
performStartMetaNode
protected void performStartMetaNode()
-
setMetaNodeAttribute
public final void setMetaNodeAttribute(java.lang.String name, java.lang.Object attr)Description copied from interface:InputFeedDefines an attribute for the meta-nodes. For each meta node, at least the 'type' attribute (namespace: LibLayout) should be defined.- Specified by:
setMetaNodeAttributein interfaceInputFeed
-
performSetMetaNodeAttribute
protected void performSetMetaNodeAttribute(java.lang.String name, java.lang.Object attr)
-
endMetaNode
public void endMetaNode()
- Specified by:
endMetaNodein interfaceInputFeed
-
performEndMetaNode
protected void performEndMetaNode()
-
endMetaInfo
public final void endMetaInfo() throws InputFeedException- Specified by:
endMetaInfoin interfaceInputFeed- Throws:
InputFeedException
-
getNamespaceCollection
public NamespaceCollection getNamespaceCollection()
- Specified by:
getNamespaceCollectionin interfaceInputFeed
-
performEndMetaInfo
protected void performEndMetaInfo() throws InputFeedException- Throws:
InputFeedException
-
startElement
public final void startElement(java.lang.String namespace, java.lang.String name) throws InputFeedException- Specified by:
startElementin interfaceInputFeed- Throws:
InputFeedException
-
performStartElement
protected void performStartElement(java.lang.String namespace, java.lang.String name)
-
setAttribute
public final void setAttribute(java.lang.String namespace, java.lang.String name, java.lang.Object attr)- Specified by:
setAttributein interfaceInputFeed
-
performSetAttribute
protected void performSetAttribute(java.lang.String namespace, java.lang.String name, java.lang.Object attr)
-
addContent
public final void addContent(java.lang.String text) throws InputFeedException- Specified by:
addContentin interfaceInputFeed- Throws:
InputFeedException
-
performAddContent
protected void performAddContent(java.lang.String text) throws InputFeedException, java.io.IOException, NormalizationException- Throws:
InputFeedExceptionjava.io.IOExceptionNormalizationException
-
endElement
public final void endElement() throws InputFeedException- Specified by:
endElementin interfaceInputFeed- Throws:
InputFeedException
-
performEndElement
protected void performEndElement() throws java.io.IOException, NormalizationException- Throws:
java.io.IOExceptionNormalizationException
-
endDocument
public final void endDocument() throws InputFeedException- Specified by:
endDocumentin interfaceInputFeed- Throws:
InputFeedException
-
performEndDocument
protected void performEndDocument() throws java.io.IOException, NormalizationException- Throws:
java.io.IOExceptionNormalizationException
-
getProcess
protected LayoutProcess getProcess()
-
getState
protected int getState()
-
getNormalizer
public Normalizer getNormalizer()
-
saveState
public State saveState() throws StateException
- Specified by:
saveStatein interfaceStatefullComponent- Throws:
StateException
-
getCurrentNormalizer
public Normalizer getCurrentNormalizer()
Warning; This method is needed internally, mess with it from the outside and you will run into trouble. The normalizer is a statefull component and any call to it may mess up the state. From there on, 'Abandon every hope, ye who enter here'.- Specified by:
getCurrentNormalizerin interfaceInputFeed- Returns:
-
-