[FOray-commit] SF.net SVN: foray: [9705] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-06-06 21:03:22
|
Revision: 9705
http://svn.sourceforge.net/foray/?rev=9705&view=rev
Author: victormote
Date: 2007-06-06 14:00:10 -0700 (Wed, 06 Jun 2007)
Log Message:
-----------
Reduce dependencies on getChildren() methods in the tree structures.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -222,9 +222,9 @@
final BookmarkTreeArea bmtArea = BookmarkTreeArea.makeBookmarkTreeArea(
bookmarkTree, this);
this.children.add(bmtArea);
- for (int i = 0; i < bookmarkTree.getChildren().size(); i++) {
+ for (int i = 0; i < bookmarkTree.getChildCount(); i++) {
final Bookmark bookmark = (Bookmark)
- bookmarkTree.getChildren().get(i);
+ bookmarkTree.getChildAt(i);
bmtArea.makeBookmarkArea(bookmark);
}
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -30,7 +30,6 @@
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaW.AreaWException;
-import org.axsl.foR.FoNode;
import org.axsl.foR.Fo;
import org.axsl.foR.fo.Bookmark;
import org.axsl.foR.fo.BookmarkTitle;
@@ -140,9 +139,8 @@
* @param bookmark The "generated-by" Bookmark.
*/
public void makeChildren(final Bookmark bookmark) {
- final List<? extends FoNode> children = bookmark.getChildren();
- for (int i = 0; i < children.size(); i++) {
- final Fo child = (Fo) children.get(i);
+ for (int i = 0; i < bookmark.getChildCount(); i++) {
+ final Fo child = (Fo) bookmark.getChildAt(i);
if (child instanceof Bookmark) {
this.makeBookmarkArea((Bookmark) child);
} else if (child instanceof BookmarkTitle) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -113,11 +113,11 @@
}
List<TableRow> keepWith = new ArrayList<TableRow>();
- final int numChildren = node.getChildren().size();
+ final int numChildren = node.getChildCount();
TableRow lastRow = null;
boolean endKeepGroup = true;
for (int i = getProgress(); i < numChildren; i++) {
- final Object child = node.getChildren().get(i);
+ final Object child = node.getChildAt(i);
if (child instanceof Marker) {
final MarkerPL markerPL = (MarkerPL) getLayoutProxy(
(FoNode) child);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -72,9 +72,9 @@
// See if ancestor table has generated any areas yet.
final TableArea tableArea = areaNode.ancestorTableArea();
if (tableArea != null && tableArea.siblingIndex() != 0) {
- final int numChildren = this.label.getChildren().size();
+ final int numChildren = this.label.getChildCount();
for (int i = getProgress(); i < numChildren; i++) {
- final FoNode fo = this.label.getChildren().get(i);
+ final FoNode fo = this.label.getChildAt(i);
final Status status = getLayoutProxy(fo).layout(areaNode,
graftingPoint);
if (status.isIncomplete()) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -177,8 +177,8 @@
if (getProgress() == FONodePL.START) {
setProgress(0);
}
- for (int i = getProgress(); i < foNode.getChildren().size(); i++) {
- final FoNode fo = foNode.getChildren().get(i);
+ for (int i = getProgress(); i < foNode.getChildCount(); i++) {
+ final FoNode fo = foNode.getChildAt(i);
final Status status = getLayoutProxy(fo).layout(areaNode,
graftingPoint);
if (status.isIncomplete()) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -128,8 +128,8 @@
if (start == FONodePL.START) {
start = 0;
}
- for (int i = start; i < node.getChildren().size(); i++) {
- final FoNode fo = node.getChildren().get(i);
+ for (int i = start; i < node.getChildCount(); i++) {
+ final FoNode fo = node.getChildAt(i);
final FONodePL nodePL = this.getLayoutProxy(fo);
final Status status = nodePL.layout(areaNode, graftingPoint);
if (status.isIncomplete()) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -76,9 +76,9 @@
final RegionRABody bac = (RegionRABody) areaNode;
boolean prevChildMustKeepWithNext = false;
- final int numChildren = getFONode().getChildren().size();
+ final int numChildren = getFONode().getChildCount();
for (int i = getProgress(); i < numChildren; i++) {
- final Fo fo = (Fo) getFONode().getChildren().get(i);
+ final Fo fo = (Fo) getFONode().getChildAt(i);
if (bac.getMainRA().isBalancingRequired(fo)) {
// reset the the just-done span area in preparation
@@ -105,7 +105,7 @@
&& (getStatus().laidOutNone())) {
setProgress(i - 1);
final Fo prevChild =
- (Fo) getFONode().getChildren().get(getProgress());
+ (Fo) getFONode().getChildAt(getProgress());
final FObjPL prevChildPL = (FObjPL) getLayoutProxy(
prevChild);
prevChildPL.resetProgress();
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -68,7 +68,7 @@
}
final FootnoteRA referenceArea = (FootnoteRA) areaNode;
- final int numChildren = this.node.getChildren().size();
+ final int numChildren = this.node.getChildCount();
for (int i = getProgress(); i < numChildren; i++) {
final FoNode fo = this.node.getChildAt(i);
final FONodePL foNodePL = getLayoutProxy(fo);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -79,9 +79,9 @@
final ListBlockArea blockArea = bcArea.makeListBlockArea(this.node,
graftingPoint);
- final int numChildren = this.node.getChildren().size();
+ final int numChildren = this.node.getChildCount();
for (int i = listBlockPL.getProgress(); i < numChildren; i++) {
- final ListItem listItem = (ListItem) this.node.getChildren().get(i);
+ final ListItem listItem = (ListItem) this.node.getChildAt(i);
final ListItemPL listItemPL = (ListItemPL) getLayoutProxy(
listItem);
Status status = listItemPL.layout(blockArea, graftingPoint);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -73,9 +73,9 @@
setProgress(0);
}
- final int numChildren = this.node.getChildren().size();
+ final int numChildren = this.node.getChildCount();
for (int i = getProgress(); i < numChildren; i++) {
- final Fo fo = (Fo) this.node.getChildren().get(i);
+ final Fo fo = (Fo) this.node.getChildAt(i);
final Status status = getLayoutProxy(fo).layout(container,
graftingPoint);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -72,9 +72,9 @@
if (getProgress() == FONodePL.START) {
setProgress(0);
}
- final int numChildren = this.node.getChildren().size();
+ final int numChildren = this.node.getChildCount();
for (int i = getProgress(); i < numChildren; i++) {
- final Fo fo = (Fo) this.node.getChildren().get(i);
+ final Fo fo = (Fo) this.node.getChildAt(i);
final Status status = getLayoutProxy(fo).layout(container,
graftingPoint);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -74,7 +74,7 @@
/* Lay out the list-item-label inside the new list-item area. */
final ListItemLabel label =
- (ListItemLabel) this.node.getChildren().get(0);
+ (ListItemLabel) this.node.getChildAt(0);
Status status;
/* What follows doesn't yet take into account whether the body failed
* completely or only got some text in. */
@@ -88,7 +88,7 @@
}
/* Lay out the list-item-body inside the new list-item area. */
- final ListItemBody body = (ListItemBody) this.node.getChildren().get(1);
+ final ListItemBody body = (ListItemBody) this.node.getChildAt(1);
final ListItemBodyPL bodyPL = (ListItemBodyPL) getLayoutProxy(body);
status = bodyPL.layout(group, graftingPoint);
if (status.isIncomplete()) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -72,8 +72,8 @@
// Necessary because the marker may get used multiple times.
markerPL.resetProgress();
markerPL.setProgress(0);
- for (int i = 0; i < bestMarker.getChildren().size(); i++) {
- final FoNode fo = bestMarker.getChildren().get(i);
+ for (int i = 0; i < bestMarker.getChildCount(); i++) {
+ final FoNode fo = bestMarker.getChildAt(i);
getLayoutProxy(fo).layout(areaNode, this.node);
}
return Status.OK;
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -58,10 +58,10 @@
*/
public Status layout(final AreaNode areaNode,
final GraftingPoint graftingPoint) throws AreaWException {
- final int numChildren = this.node.getChildren().size();
+ final int numChildren = this.node.getChildCount();
for (int i = 0; i < numChildren; i++) {
- final Fo fo = (Fo) this.node.getChildren().get(i);
+ final Fo fo = (Fo) this.node.getChildAt(i);
Status status = getLayoutProxy(fo).layout(areaNode, graftingPoint);
if (status.isIncomplete()) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -101,9 +101,9 @@
areaContainer = cellArea;
- final int numChildren = this.node.getChildren().size();
+ final int numChildren = this.node.getChildCount();
for (int i = getProgress(); bDone == false && i < numChildren; i++) {
- final Fo fo = (Fo) this.node.getChildren().get(i);
+ final Fo fo = (Fo) this.node.getChildAt(i);
// Overflows may cause a row to be re-layedout,
// need to pass already processed content.
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2007-06-06 19:46:38 UTC (rev 9704)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2007-06-06 21:00:10 UTC (rev 9705)
@@ -102,7 +102,7 @@
/* Process the marker children. */
for (int i = getProgress(); i < table.qtyMarkerChildren(); i++) {
- final FoNode fo = table.getChildren().get(i);
+ final FoNode fo = table.getChildAt(i);
if (fo instanceof Marker) {
final MarkerPL markerPL = (MarkerPL) getLayoutProxy(fo);
markerPL.layout(areaNode, graftingPoint);
@@ -149,8 +149,8 @@
}
/* Process the table body(s). */
- for (int i = getProgress(); i < table.getChildren().size(); i++) {
- final FoNode fo = table.getChildren().get(i);
+ for (int i = getProgress(); i < table.getChildCount(); i++) {
+ final FoNode fo = table.getChildAt(i);
if (fo instanceof TableBody) {
status = getLayoutProxy(fo).layout(tableArea,
graftingPoint);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|