|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fo.XMLWhiteSpaceHandler
Class encapsulating the functionality for white-space-handling
during refinement stage.
The handleWhiteSpace()
methods are called during
FOTree-building and marker-cloning:
FObjMixed.addChildNode()
FObjMixed.endOfNode()
FObjMixed.handleWhiteSpaceFor()
FOText
or Character
nodes that
were added:
newChild
(and after the previous
non-text child node)newChild
is null
,
after the previous non-text childfirstTextNode
,
goes on until the last text-node is reached, and deals only
with FOText nodes (characters are immediately removed) or
Character nodes (characters are kept track of and removed
from the list of child nodes later, when the iterator goes
out of scope)
Note: if the method is called from an inline's endOfNode(),
there is too little context to decide whether trailing
white-space may be removed, so the pending inline is stored
in a List, together with an iterator for which the next()
method returns the first in the trailing sequence of white-
space characters. This List is processed again at the end
of the ancestor block.
Constructor Summary | |
XMLWhiteSpaceHandler()
|
Method Summary | |
void |
addDiscardableFOChar(Character foChar)
Marks a Character object as discardable, so that it is effectively removed from the FOTree at the end of handleWhitespace() |
void |
handleWhiteSpace(FObjMixed fo,
FONode firstTextNode)
Handle white-space for the fo that is passed in, starting at firstTextNode |
void |
handleWhiteSpace(FObjMixed fo,
FONode firstTextNode,
FONode nextChild)
Handle white-space for the fo that is passed in, starting at firstTextNode (when a nested FO is encountered) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMLWhiteSpaceHandler()
Method Detail |
public void addDiscardableFOChar(Character foChar)
foChar
- the Character object to be removed from the list of
childNodespublic void handleWhiteSpace(FObjMixed fo, FONode firstTextNode)
fo
- the FO for which to handle white-spacefirstTextNode
- the node at which to startpublic void handleWhiteSpace(FObjMixed fo, FONode firstTextNode, FONode nextChild)
fo
- the FO for which to handle white-spacefirstTextNode
- the node at which to startnextChild
- the child-node that will be added to the list after
the last text-node
|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |