java.lang.Object
org.jfor.jfor.converter.AbstractBuilder
org.jfor.jfor.converter.ParagraphBuilder
- All Implemented Interfaces:
- IBuilder
- class ParagraphBuilder
- extends AbstractBuilder
Builds RtfParagraphs for fo:block elements.
| Methods inherited from class org.jfor.jfor.converter.AbstractBuilder |
attributeIsSet, attributeIsSet, getAttribute, getAttribute, getValue, getValue, hasAttributeValue, hasAttributeValue, ignoreChildren, postEnd, preStart, useForChildren |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TAG_FO_BLOCK
public static final java.lang.String TAG_FO_BLOCK
- See Also:
- Constant Field Values
ATTRIBUTE_FO_KEEP_TOGETHER
public static final java.lang.String ATTRIBUTE_FO_KEEP_TOGETHER
- See Also:
- Constant Field Values
m_textBuilder
private TextBuilder m_textBuilder
m_attrib
private org.xml.sax.Attributes m_attrib
m_para
private org.jfor.jfor.rtflib.rtfdoc.RtfParagraph m_para
m_paragraphKeeptogetherContext
private org.jfor.jfor.rtflib.rtfdoc.ParagraphKeeptogetherContext m_paragraphKeeptogetherContext
m_paraKeepOpenOwner
private boolean m_paraKeepOpenOwner
- Determine if this block is the owner of the keep-together attribute
m_nestedInto
private final ParagraphBuilder m_nestedInto
- if this fo:block is nested into another one, this is the builder that
processes the enclosing block
ParagraphBuilder
ParagraphBuilder(BuilderContext ctx)
start
public void start(java.lang.String rawName,
org.xml.sax.Attributes attrs)
throws java.io.IOException
- called by Converter at the start of an element
end
public void end()
throws java.io.IOException
- called by Converter at the end of an element
characters
public void characters(java.lang.String str)
throws java.io.IOException
- called by the parser for Text nodes
- Specified by:
characters in interface IBuilder- Overrides:
characters in class AbstractBuilder
getBuilder
public IBuilder getBuilder(BuilderContext ctx,
java.lang.String rawName,
org.xml.sax.Attributes atts)
- this builder processes fo:block elements
nestedParagraphEnds
private void nestedParagraphEnds()
throws java.io.IOException
- called by end() when an fo:block that is directly nested into the one we are processing ends
startParagraphKeepTogether
private org.jfor.jfor.rtflib.rtfdoc.RtfParagraphKeepTogether startParagraphKeepTogether()
throws java.io.IOException
- Create a new RtfParagraphKeepTogether
startParagraph
private org.jfor.jfor.rtflib.rtfdoc.RtfParagraph startParagraph(boolean isAfterNestedBlock)
throws java.io.IOException
- Add an RtfParagraph to the current paragraph container.
Can be called several times for the same ParagraphBuilder, for example when fo:blocks
are nested (see XSL-FO example file 001-fop-compare-blocks.fo.xml);
Example of nested blocks:
fo:block A, attributes A
text A1
fo:block B nested into A, attributes B
text B1
text A2
The resulting RTF is:
RtfParagraph(attributes A):"text A1"
RtfParagraph(attributes B):"text B1"
RtfParagraph(attributes A):"text A2"
Which is similar to what FOP does in such a case