public class BuilderContext extends Object
A BuilderContext holds context information when building an RTF document.
This class was originally developed by Bertrand Delacretaz bdelacretaz@codeconsult.ch for the JFOR project and is now integrated into FOP.This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch), Andreas Putz (a.putz@skynamics.com), and Peter Herweg (pherweg@web.de).
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
LOG
Static logging instance
|
| Constructor and Description |
|---|
BuilderContext(IRtfOptions rtfOptions)
Construct a builder context.
|
| Modifier and Type | Method and Description |
|---|---|
RtfContainer |
getContainer(Class containerClass,
boolean required,
Object forWhichBuilder)
Find the "nearest" container that implements the given interface on our stack.
|
TableContext |
getTableContext() |
void |
popContainer(Class containerClass,
RTFHandler handler)
pop the topmost RtfContainer from our stack
|
void |
popPart(Class part,
RTFHandler handler)
pop the topmost part class from our stack
|
void |
popTableContext()
Pop a TableContext from our stack.
|
void |
pushContainer(RtfContainer c)
Push an RtfContainer on our stack.
|
void |
pushPart(FObj part)
Push a Class representing a non-writeable section of the FO tree
|
void |
pushTableContext(TableContext tc)
Push a TableContext to our stack.
|
void |
replaceContainer(RtfContainer oldC,
RtfContainer newC)
In some cases an RtfContainer must be replaced by another one on the
stack.
|
public BuilderContext(IRtfOptions rtfOptions)
rtfOptions - some optionspublic RtfContainer getContainer(Class containerClass, boolean required, Object forWhichBuilder) throws RtfException
containerClass - class of containerrequired - if true, ConverterException is thrown if no container foundforWhichBuilder - used in error message if container not foundRtfException - if not caughtpublic void pushContainer(RtfContainer c)
c - the containerpublic void pushPart(FObj part)
part - the partpublic void replaceContainer(RtfContainer oldC, RtfContainer newC) throws Exception
oldC - old containernewC - new containerException - if not caughtpublic void popContainer(Class containerClass, RTFHandler handler)
public void popPart(Class part, RTFHandler handler)
public TableContext getTableContext()
public void pushTableContext(TableContext tc)
tc - the table contextpublic void popTableContext()
Copyright © 2025 Apache Software Foundation. All rights reserved.