diff options
author | Glen Mazza <gmazza@apache.org> | 2004-10-12 05:07:47 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-10-12 05:07:47 +0000 |
commit | 7ed159fa02ed35e2475b15077bcf1bf55c5d96ea (patch) | |
tree | 313c511883e153e43e848390b9eb26db422ec8c0 /src/java/org | |
parent | 3c21cd4aa077d9279c0840f9317dc36d888308d5 (diff) | |
download | xmlgraphics-fop-7ed159fa02ed35e2475b15077bcf1bf55c5d96ea.tar.gz xmlgraphics-fop-7ed159fa02ed35e2475b15077bcf1bf55c5d96ea.zip |
PR:
Obtained from:
Submitted by:
Reviewed by:
Start of work to move FOText from extending FObj to extending FONode instead.
All work is done except for changing FObj's parent from FObj to
FONode. The RTF library works fine with the switch, but simple.fo and
franklin_alt.fo (among others I guess) will not work properly when FOText's
parent is switched. (Layout problems occur--lines don't break properly
with the switch.)
Switch to super() constructor (instead of super(fobj) one) within
within TextLayoutManager, as it is not needed for this subclass, also to
facilitate the change above.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198040 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
28 files changed, 96 insertions, 100 deletions
diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java index 24e345a00..1c0867f99 100644 --- a/src/java/org/apache/fop/fo/FONode.java +++ b/src/java/org/apache/fop/fo/FONode.java @@ -19,6 +19,7 @@ package org.apache.fop.fo; // Java +import java.util.List; import java.util.ListIterator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -137,13 +138,6 @@ public abstract class FONode { /** * */ - protected void start() { - // do nothing by default - } - - /** - * - */ protected void endOfNode() throws SAXParseException { // do nothing by default } @@ -329,6 +323,14 @@ public abstract class FONode { } /** + * Return a LayoutManager responsible for laying out this FObj's content. + * Must override in subclasses if their content can be laid out. + * @param list the list to which the layout manager(s) should be added + */ + public void addLayoutManager(List list) { + } + + /** * Returns the name of the node * @return the name of this node */ diff --git a/src/java/org/apache/fop/fo/FOText.java b/src/java/org/apache/fop/fo/FOText.java index 080ed72c6..3ccc2a934 100644 --- a/src/java/org/apache/fop/fo/FOText.java +++ b/src/java/org/apache/fop/fo/FOText.java @@ -131,7 +131,7 @@ public class FOText extends FObj { * @return true if this will create an area in the output */ public boolean willCreateArea() { - if (textInfo.whiteSpaceCollapse == WhiteSpaceCollapse.FALSE + if (textInfo.whiteSpaceCollapse == Constants.WhiteSpaceCollapse.FALSE && endIndex - startIndex > 0) { return true; } @@ -194,7 +194,7 @@ public class FOText extends FObj { * text-transform property. */ private void textTransform() { - if (textInfo.textTransform == TextTransform.NONE) { + if (textInfo.textTransform == Constants.TextTransform.NONE) { return; } for (int i = 0; i < endIndex; i++) { @@ -323,13 +323,13 @@ public class FOText extends FObj { private char charTransform(int i) { switch (textInfo.textTransform) { /* put NONE first, as this is probably the common case */ - case TextTransform.NONE: + case Constants.TextTransform.NONE: return ca[i]; - case TextTransform.UPPERCASE: + case Constants.TextTransform.UPPERCASE: return Character.toUpperCase(ca[i]); - case TextTransform.LOWERCASE: + case Constants.TextTransform.LOWERCASE: return Character.toLowerCase(ca[i]); - case TextTransform.CAPITALIZE: + case Constants.TextTransform.CAPITALIZE: if (isStartOfWord(i)) { /* Use toTitleCase here. Apparently, some languages use @@ -497,7 +497,7 @@ public class FOText extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { if (endIndex - startIndex > 0) { diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java index 2e3e4e49d..86d171792 100644 --- a/src/java/org/apache/fop/fo/FObj.java +++ b/src/java/org/apache/fop/fo/FObj.java @@ -21,7 +21,6 @@ package org.apache.fop.fo; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; -import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.Set; @@ -459,14 +458,6 @@ public class FObj extends FONode implements Constants { return markers; } - /** - * Return a LayoutManager responsible for laying out this FObj's content. - * Must override in subclasses if their content can be laid out. - * @param list the list to which the layout manager(s) should be added - */ - public void addLayoutManager(List list) { - } - /* * Return a string representation of the fo element. * Deactivated in order to see precise ID of each fo element created diff --git a/src/java/org/apache/fop/fo/FObjMixed.java b/src/java/org/apache/fop/fo/FObjMixed.java index 210397ade..5c72cbc6b 100644 --- a/src/java/org/apache/fop/fo/FObjMixed.java +++ b/src/java/org/apache/fop/fo/FObjMixed.java @@ -69,7 +69,7 @@ public class FObjMixed extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { if (getChildNodes() != null) { diff --git a/src/java/org/apache/fop/fo/flow/BasicLink.java b/src/java/org/apache/fop/fo/flow/BasicLink.java index 74d8624f1..101d0ccfa 100644 --- a/src/java/org/apache/fop/fo/flow/BasicLink.java +++ b/src/java/org/apache/fop/fo/flow/BasicLink.java @@ -106,7 +106,7 @@ public class BasicLink extends Inline { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { BasicLinkLayoutManager lm = new BasicLinkLayoutManager(this); diff --git a/src/java/org/apache/fop/fo/flow/BidiOverride.java b/src/java/org/apache/fop/fo/flow/BidiOverride.java index 0bb664e63..73f8118e7 100644 --- a/src/java/org/apache/fop/fo/flow/BidiOverride.java +++ b/src/java/org/apache/fop/fo/flow/BidiOverride.java @@ -109,7 +109,7 @@ public class BidiOverride extends FObjMixed { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) * @todo see if can/should move the child iteration logic * to BidiLayoutManager */ diff --git a/src/java/org/apache/fop/fo/flow/Block.java b/src/java/org/apache/fop/fo/flow/Block.java index 29b3bf1e5..203a916e7 100644 --- a/src/java/org/apache/fop/fo/flow/Block.java +++ b/src/java/org/apache/fop/fo/flow/Block.java @@ -342,7 +342,7 @@ public class Block extends FObjMixed { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { BlockLayoutManager blm = new BlockLayoutManager(this); diff --git a/src/java/org/apache/fop/fo/flow/BlockContainer.java b/src/java/org/apache/fop/fo/flow/BlockContainer.java index 11e530e20..af9079c23 100644 --- a/src/java/org/apache/fop/fo/flow/BlockContainer.java +++ b/src/java/org/apache/fop/fo/flow/BlockContainer.java @@ -91,7 +91,7 @@ public class BlockContainer extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { BlockContainerLayoutManager blm = new BlockContainerLayoutManager(this); diff --git a/src/java/org/apache/fop/fo/flow/Character.java b/src/java/org/apache/fop/fo/flow/Character.java index 19fc2f62c..f1b185826 100644 --- a/src/java/org/apache/fop/fo/flow/Character.java +++ b/src/java/org/apache/fop/fo/flow/Character.java @@ -89,7 +89,7 @@ public class Character extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { String str = getPropString(PR_CHARACTER); diff --git a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java index 0bb8bd5cb..241d5ebae 100644 --- a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java +++ b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java @@ -66,7 +66,7 @@ public class ExternalGraphic extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { if (getPropString(PR_SRC) != null) { diff --git a/src/java/org/apache/fop/fo/flow/Footnote.java b/src/java/org/apache/fop/fo/flow/Footnote.java index 2d2940c30..f44c2950a 100644 --- a/src/java/org/apache/fop/fo/flow/Footnote.java +++ b/src/java/org/apache/fop/fo/flow/Footnote.java @@ -112,7 +112,7 @@ public class Footnote extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { if (getInlineFO() == null) { diff --git a/src/java/org/apache/fop/fo/flow/InlineContainer.java b/src/java/org/apache/fop/fo/flow/InlineContainer.java index 76fa472a0..4d375827a 100644 --- a/src/java/org/apache/fop/fo/flow/InlineContainer.java +++ b/src/java/org/apache/fop/fo/flow/InlineContainer.java @@ -53,7 +53,7 @@ public class InlineContainer extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { ArrayList childList = new ArrayList(); diff --git a/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java b/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java index 9de8bf20b..952afe133 100644 --- a/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java +++ b/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java @@ -109,7 +109,7 @@ public class InstreamForeignObject extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { InstreamForeignObjectLM lm = new InstreamForeignObjectLM(this); diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java index 91fafb0b3..b18d2e17d 100644 --- a/src/java/org/apache/fop/fo/flow/Leader.java +++ b/src/java/org/apache/fop/fo/flow/Leader.java @@ -125,7 +125,7 @@ public class Leader extends FObjMixed { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { setup(); diff --git a/src/java/org/apache/fop/fo/flow/ListBlock.java b/src/java/org/apache/fop/fo/flow/ListBlock.java index 315e1cf39..952e9d044 100644 --- a/src/java/org/apache/fop/fo/flow/ListBlock.java +++ b/src/java/org/apache/fop/fo/flow/ListBlock.java @@ -84,7 +84,7 @@ public class ListBlock extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { ListBlockLayoutManager lm = new ListBlockLayoutManager(this); diff --git a/src/java/org/apache/fop/fo/flow/ListItem.java b/src/java/org/apache/fop/fo/flow/ListItem.java index abd218d5e..3a46abe35 100644 --- a/src/java/org/apache/fop/fo/flow/ListItem.java +++ b/src/java/org/apache/fop/fo/flow/ListItem.java @@ -109,7 +109,7 @@ public class ListItem extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { ListItemLayoutManager blm = new ListItemLayoutManager(this); diff --git a/src/java/org/apache/fop/fo/flow/PageNumber.java b/src/java/org/apache/fop/fo/flow/PageNumber.java index 4fa497b1c..022d8dcf2 100644 --- a/src/java/org/apache/fop/fo/flow/PageNumber.java +++ b/src/java/org/apache/fop/fo/flow/PageNumber.java @@ -91,7 +91,7 @@ public class PageNumber extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { PageNumberLayoutManager lm = new PageNumberLayoutManager(this); diff --git a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java index af5253b63..c256cec75 100644 --- a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java +++ b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java @@ -67,7 +67,7 @@ public class PageNumberCitation extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { PageNumberCitationLayoutManager lm = diff --git a/src/java/org/apache/fop/fo/flow/RetrieveMarker.java b/src/java/org/apache/fop/fo/flow/RetrieveMarker.java index e3c322111..c983f6b5b 100644 --- a/src/java/org/apache/fop/fo/flow/RetrieveMarker.java +++ b/src/java/org/apache/fop/fo/flow/RetrieveMarker.java @@ -84,7 +84,7 @@ public class RetrieveMarker extends FObjMixed { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { RetrieveMarkerLayoutManager lm = new RetrieveMarkerLayoutManager(this); diff --git a/src/java/org/apache/fop/fo/flow/Table.java b/src/java/org/apache/fop/fo/flow/Table.java index e3e830f04..2ccc2c00c 100644 --- a/src/java/org/apache/fop/fo/flow/Table.java +++ b/src/java/org/apache/fop/fo/flow/Table.java @@ -132,7 +132,7 @@ public class Table extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) * @todo see if can/should move much of this logic into TableLayoutManager * and/or TableBody and TableColumn FO subclasses. */ diff --git a/src/java/org/apache/fop/fo/flow/TableBody.java b/src/java/org/apache/fop/fo/flow/TableBody.java index 931c16181..fedd50321 100644 --- a/src/java/org/apache/fop/fo/flow/TableBody.java +++ b/src/java/org/apache/fop/fo/flow/TableBody.java @@ -65,7 +65,7 @@ public class TableBody extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { Body blm = new Body(this); diff --git a/src/java/org/apache/fop/fo/flow/TableCell.java b/src/java/org/apache/fop/fo/flow/TableCell.java index 5524d9dcf..84e226f79 100644 --- a/src/java/org/apache/fop/fo/flow/TableCell.java +++ b/src/java/org/apache/fop/fo/flow/TableCell.java @@ -325,7 +325,7 @@ public class TableCell extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { Cell clm = new Cell(this); diff --git a/src/java/org/apache/fop/fo/flow/TableRow.java b/src/java/org/apache/fop/fo/flow/TableRow.java index e5deda18c..ecae89376 100644 --- a/src/java/org/apache/fop/fo/flow/TableRow.java +++ b/src/java/org/apache/fop/fo/flow/TableRow.java @@ -128,7 +128,7 @@ public class TableRow extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { Row rlm = new Row(this); diff --git a/src/java/org/apache/fop/fo/flow/Wrapper.java b/src/java/org/apache/fop/fo/flow/Wrapper.java index 5f01c7fa9..6935b7998 100644 --- a/src/java/org/apache/fop/fo/flow/Wrapper.java +++ b/src/java/org/apache/fop/fo/flow/Wrapper.java @@ -46,7 +46,7 @@ public class Wrapper extends FObjMixed { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) * @todo remove null check when vCN() & endOfNode() implemented */ public void addLayoutManager(List list) { diff --git a/src/java/org/apache/fop/fo/pagination/Flow.java b/src/java/org/apache/fop/fo/pagination/Flow.java index defb9cb9d..aa751a9a6 100644 --- a/src/java/org/apache/fop/fo/pagination/Flow.java +++ b/src/java/org/apache/fop/fo/pagination/Flow.java @@ -126,7 +126,7 @@ public class Flow extends FObj { } /** - * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @see org.apache.fop.fo.FONode#addLayoutManager(List) */ public void addLayoutManager(List list) { FlowLayoutManager lm = new FlowLayoutManager(this); diff --git a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java index 9d04eb4a4..d8a624e1d 100644 --- a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java @@ -19,6 +19,7 @@ package org.apache.fop.layoutmgr; import org.apache.fop.fo.FObj; +import org.apache.fop.fo.FONode; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.area.Area; import org.apache.fop.area.Resolveable; @@ -413,9 +414,9 @@ public abstract class AbstractLayoutManager implements LayoutManager, Constants List newLMs = new ArrayList(size); while (fobjIter.hasNext() && newLMs.size() < size ) { Object theobj = fobjIter.next(); - if (theobj instanceof FObj) { - FObj fobj = (FObj) theobj; - fobj.addLayoutManager(newLMs); + if (theobj instanceof FONode) { + FONode foNode = (FONode) theobj; + foNode.addLayoutManager(newLMs); } } return newLMs; diff --git a/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java index 2813faa65..28e05f3ea 100644 --- a/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java @@ -121,7 +121,8 @@ public class TextLayoutManager extends AbstractLayoutManager { * @param node The FOText object to be rendered */ public TextLayoutManager(FOText node) { - super(node); + super(); + foText = node; textArray = new char[node.endIndex - node.startIndex]; System.arraycopy(node.ca, node.startIndex, textArray, 0, diff --git a/src/java/org/apache/fop/render/rtf/RTFHandler.java b/src/java/org/apache/fop/render/rtf/RTFHandler.java index 18aeee17c..25044eccd 100644 --- a/src/java/org/apache/fop/render/rtf/RTFHandler.java +++ b/src/java/org/apache/fop/render/rtf/RTFHandler.java @@ -30,6 +30,7 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.fo.FOEventHandler; import org.apache.fop.fo.FObj; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.BasicLink; import org.apache.fop.fo.flow.Block; import org.apache.fop.fo.flow.BlockContainer; @@ -367,7 +368,7 @@ public class RTFHandler extends FOEventHandler { bDefer = false; bDeferredExecution=true; - recurseFObj(bl); + recurseFONode(bl); bDeferredExecution=false; //exit function, because the code has already beed executed while @@ -1225,115 +1226,115 @@ public class RTFHandler extends FOEventHandler { /** * Calls the appropriate event handler for the passed FObj. * - * @param fobj FO-object whose event is to be called + * @param foNode FO node whose event is to be called * @param bStart TRUE calls the start handler, FALSE the end handler */ - private void invokeDeferredEvent(FObj fobj, boolean bStart) { - if (fobj instanceof Block) { + private void invokeDeferredEvent(FONode foNode, boolean bStart) { + if (foNode instanceof Block) { if (bStart) { - startBlock( (Block) fobj); + startBlock( (Block) foNode); } else { - endBlock( (Block) fobj); + endBlock( (Block) foNode); } - } else if (fobj instanceof Inline) { + } else if (foNode instanceof Inline) { if (bStart) { - startInline( (Inline) fobj); + startInline( (Inline) foNode); } else { - endInline( (Inline) fobj); + endInline( (Inline) foNode); } - } else if (fobj instanceof FOText) { + } else if (foNode instanceof FOText) { if (bStart) { - FOText text = (FOText) fobj; + FOText text = (FOText) foNode; characters(text.ca, text.startIndex, text.endIndex); } - } else if (fobj instanceof Character) { + } else if (foNode instanceof Character) { if (bStart) { - Character c = (Character) fobj; + Character c = (Character) foNode; character(c); } - } else if (fobj instanceof BasicLink) { + } else if (foNode instanceof BasicLink) { if (bStart) { - startLink( (BasicLink) fobj); + startLink( (BasicLink) foNode); } else { endLink(); } - } else if (fobj instanceof PageNumber) { + } else if (foNode instanceof PageNumber) { if (bStart) { - startPageNumber( (PageNumber) fobj); + startPageNumber( (PageNumber) foNode); } else { - endPageNumber( (PageNumber) fobj); + endPageNumber( (PageNumber) foNode); } - } else if (fobj instanceof Footnote) { + } else if (foNode instanceof Footnote) { if (bStart) { - startFootnote( (Footnote) fobj); + startFootnote( (Footnote) foNode); } else { - endFootnote( (Footnote) fobj); + endFootnote( (Footnote) foNode); } - } else if (fobj instanceof FootnoteBody) { + } else if (foNode instanceof FootnoteBody) { if (bStart) { - startFootnoteBody( (FootnoteBody) fobj); + startFootnoteBody( (FootnoteBody) foNode); } else { - endFootnoteBody( (FootnoteBody) fobj); + endFootnoteBody( (FootnoteBody) foNode); } - } else if (fobj instanceof ListBlock) { + } else if (foNode instanceof ListBlock) { if (bStart) { - startList( (ListBlock) fobj); + startList( (ListBlock) foNode); } else { - endList( (ListBlock) fobj); + endList( (ListBlock) foNode); } - } else if (fobj instanceof ListItem) { + } else if (foNode instanceof ListItem) { if (bStart) { - startListItem( (ListItem) fobj); + startListItem( (ListItem) foNode); } else { - endListItem( (ListItem) fobj); + endListItem( (ListItem) foNode); } - } else if (fobj instanceof ListItemLabel) { + } else if (foNode instanceof ListItemLabel) { if (bStart) { startListLabel(); } else { endListLabel(); } - } else if (fobj instanceof Table) { + } else if (foNode instanceof Table) { if (bStart) { - startTable( (Table) fobj); + startTable( (Table) foNode); } else { - endTable( (Table) fobj); + endTable( (Table) foNode); } - } else if (fobj instanceof TableColumn) { + } else if (foNode instanceof TableColumn) { if (bStart) { - startColumn( (TableColumn) fobj); + startColumn( (TableColumn) foNode); } else { - endColumn( (TableColumn) fobj); + endColumn( (TableColumn) foNode); } - } else if (fobj instanceof TableRow) { + } else if (foNode instanceof TableRow) { if (bStart) { - startRow( (TableRow) fobj); + startRow( (TableRow) foNode); } else { - endRow( (TableRow) fobj); + endRow( (TableRow) foNode); } - } else if (fobj instanceof TableCell) { + } else if (foNode instanceof TableCell) { if (bStart) { - startCell( (TableCell) fobj); + startCell( (TableCell) foNode); } else { - endCell( (TableCell) fobj); + endCell( (TableCell) foNode); } } } /** - * Calls the event handlers for the passed FObj and all its elements. + * Calls the event handlers for the passed FONode and all its elements. * - * @param fobj FO-object which shall be recursed + * @param foNode FONode object which shall be recursed */ - private void recurseFObj(FObj fobj) { - invokeDeferredEvent(fobj, true); + private void recurseFONode(FONode foNode) { + invokeDeferredEvent(foNode, true); - if (fobj.childNodes != null) { - for(Iterator it=fobj.childNodes.iterator();it.hasNext();) { - recurseFObj( (FObj) it.next() ); + if (foNode.getChildNodes() != null) { + for(Iterator it = foNode.getChildNodes(); it.hasNext() ; ) { + recurseFONode( (FONode) it.next() ); } } - invokeDeferredEvent(fobj, false); + invokeDeferredEvent(foNode, false); } } |