Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.render.rtf.rtflib.tools
Class BuilderContext

    java.lang.Object
      org.apache.fop.render.rtf.rtflib.tools.BuilderContext

public class BuilderContext
extends java.lang.Object

A BuilderContext holds context information when building an RTF document

Author:
  Bertrand Delacretaz , putzi, Peter Herweg This class was originally developed by Bertrand Delacretaz bdelacretaz@codeconsult.ch for the JFOR project and is now integrated into FOP.

Constructor Summary
`BuilderContext(IRtfOptions rtfOptions)`

Method Summary
`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()` return the current TableContext
`void` | `popContainer()` pop the topmost RtfContainer from our stack
`void` | `popTableContext()` pop a TableContext from our stack
`void` | `pushContainer(RtfContainer c)` push an RtfContainer on our stack
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BuilderContext

    public BuilderContext(IRtfOptions rtfOptions)

Method Detail

### getContainer

    public RtfContainer getContainer(java.lang.Class containerClass,
                                     boolean required,
                                     java.lang.Object forWhichBuilder)
                              throws RtfException

  find the "nearest" container that implements the given interface on our stack

  Parameters:
    `required` - if true, ConverterException is thrown if no container found
    `forWhichBuilder` - used in error message if container not found
  Throws:
    `RtfException`

### pushContainer

    public void pushContainer(RtfContainer c)

  push an RtfContainer on our stack

### replaceContainer

    public void replaceContainer(RtfContainer oldC,
                                 RtfContainer newC)
                          throws java.lang.Exception

  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?

  Throws:
    `java.lang.Exception`

### popContainer

    public void popContainer()

  pop the topmost RtfContainer from our stack

### getTableContext

    public TableContext getTableContext()

  return the current TableContext

### pushTableContext

    public void pushTableContext(TableContext tc)

  push a TableContext to our stack

### popTableContext

    public void popTableContext()

  pop a TableContext from our stack

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.