public class BuilderContext
extends java.lang.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(java.lang.Class containerClass,
boolean required,
java.lang.Object forWhichBuilder)
Find the "nearest" container that implements the given interface on our stack.
|
TableContext |
getTableContext() |
void |
popContainer(java.lang.Class containerClass,
RTFHandler handler)
pop the topmost RtfContainer from our stack
|
void |
popPart(java.lang.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(java.lang.Class containerClass, boolean required, java.lang.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 java.lang.Exception
oldC
- old containernewC
- new containerjava.lang.Exception
- if not caughtpublic void popContainer(java.lang.Class containerClass, RTFHandler handler)
public void popPart(java.lang.Class part, RTFHandler handler)
public TableContext getTableContext()
public void pushTableContext(TableContext tc)
tc
- the table contextpublic void popTableContext()
Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.