|
|||||||||
| Home >> All >> org >> jfor >> jfor >> [ converter overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jfor.jfor.converter
Class BuilderContext

java.lang.Objectorg.jfor.jfor.converter.BuilderContext
- class BuilderContext
- extends java.lang.Object
A BuilderContext is shared between all IBuilders when building an RTF document
| Field Summary | |
(package private) ConverterLogChannel |
log
log channel |
private java.util.Stack |
m_builders
stack of IBuilders |
private java.util.Stack |
m_containers
stack of RtfContainers |
(package private) org.jfor.jfor.rtflib.rtfdoc.IRtfOptions |
m_options
Rtf options |
private org.jfor.jfor.rtflib.rtfdoc.RtfFile |
m_rtfFile
the RtfFile we're building |
private java.util.Stack |
m_tableContexts
stack of TableContexts |
| Constructor Summary | |
(package private) |
BuilderContext(java.io.Writer w,
ConverterLogChannel theLog,
org.jfor.jfor.rtflib.rtfdoc.IRtfOptions rtfOptions)
|
| Method Summary | |
(package private) IBuilder |
getBuilder(java.lang.Class builderClass,
boolean required)
find the "nearest" IBuilder of given class |
(package private) org.jfor.jfor.rtflib.rtfdoc.RtfContainer |
getContainer(java.lang.Class containerClass,
boolean required,
IBuilder forWhichBuilder)
find the "nearest" container that implements the given interface on our stack |
private java.lang.Object |
getObjectFromStack(java.util.Stack s,
java.lang.Class desiredClass)
find first object of given class from top of stack s |
(package private) org.jfor.jfor.rtflib.rtfdoc.RtfFile |
getRtfFile()
return the RtfFile that we're building |
(package private) TableContext |
getTableContext()
return the current TableContext |
(package private) IBuilder |
popBuilderAndGetPreviousOne()
pop the topmost IBuilder from our stack and return previous builder on stack |
(package private) void |
popContainer()
pop the topmost RtfContainer from our stack |
(package private) void |
popTableContext()
pop a TableContext from our stack |
(package private) void |
pushBuilder(IBuilder b)
push an IBuilder to our stack |
(package private) void |
pushContainer(org.jfor.jfor.rtflib.rtfdoc.RtfContainer c)
push an RtfContainer on our stack |
(package private) void |
pushTableContext(TableContext tc)
push a TableContext to our stack |
(package private) void |
replaceContainer(org.jfor.jfor.rtflib.rtfdoc.RtfContainer oldC,
org.jfor.jfor.rtflib.rtfdoc.RtfContainer newC)
in some cases an RtfContainer must be replaced by another one on the stack. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
m_rtfFile
private final org.jfor.jfor.rtflib.rtfdoc.RtfFile m_rtfFile
- the RtfFile we're building
m_containers
private final java.util.Stack m_containers
- stack of RtfContainers
m_tableContexts
private final java.util.Stack m_tableContexts
- stack of TableContexts
m_builders
private final java.util.Stack m_builders
- stack of IBuilders
log
ConverterLogChannel log
- log channel
m_options
org.jfor.jfor.rtflib.rtfdoc.IRtfOptions m_options
- Rtf options
| Constructor Detail |
BuilderContext
BuilderContext(java.io.Writer w, ConverterLogChannel theLog, org.jfor.jfor.rtflib.rtfdoc.IRtfOptions rtfOptions) throws java.io.IOException
| Method Detail |
getObjectFromStack
private java.lang.Object getObjectFromStack(java.util.Stack s, java.lang.Class desiredClass)
- find first object of given class from top of stack s
getBuilder
IBuilder getBuilder(java.lang.Class builderClass, boolean required) throws ConverterException
- find the "nearest" IBuilder of given class
getContainer
org.jfor.jfor.rtflib.rtfdoc.RtfContainer getContainer(java.lang.Class containerClass, boolean required, IBuilder forWhichBuilder) throws ConverterException
- find the "nearest" container that implements the given interface on our stack
pushContainer
void pushContainer(org.jfor.jfor.rtflib.rtfdoc.RtfContainer c)
- push an RtfContainer on our stack
replaceContainer
void replaceContainer(org.jfor.jfor.rtflib.rtfdoc.RtfContainer oldC, org.jfor.jfor.rtflib.rtfdoc.RtfContainer newC) throws ConverterException
- in some cases an RtfContainer must be replaced by another one on the stack.
this happens when handling nested fo:blocks for example: after handling a nested block
the enclosing block must switch to a new paragraph container to handle what follows the nested block.
TODO: what happens to elements that are "more on top" than oldC on the stack? shouldn't they be closed
or something?
popContainer
void popContainer()
- pop the topmost RtfContainer from our stack
pushBuilder
void pushBuilder(IBuilder b)
- push an IBuilder to our stack
popBuilderAndGetPreviousOne
IBuilder popBuilderAndGetPreviousOne()
- pop the topmost IBuilder from our stack and return previous builder on stack
getRtfFile
org.jfor.jfor.rtflib.rtfdoc.RtfFile getRtfFile()
- return the RtfFile that we're building
getTableContext
TableContext getTableContext()
- return the current TableContext
pushTableContext
void pushTableContext(TableContext tc)
- push a TableContext to our stack
popTableContext
void popTableContext()
- pop a TableContext from our stack
|
|||||||||
| Home >> All >> org >> jfor >> jfor >> [ converter overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.jfor.jfor.converter.BuilderContext