You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/06/09 16:33:05 UTC

svn commit: r665703 - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources: ./ src/java/org/apache/fop/fo/flow/table/ src/java/org/apache/fop/layoutmgr/ src/java/org/apache/fop/layoutmgr/inline/ src/java/org/apache/fop/layoutmgr/list/ src/java/org/apache...

Author: acumiskey
Date: Mon Jun  9 07:33:04 2008
New Revision: 665703

URL: http://svn.apache.org/viewvc?rev=665703&view=rev
Log:
Merged revisions 665699 via svnmerge from 
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk

........
  r665699 | maxberger | 2008-06-09 15:15:38 +0100 (Mon, 09 Jun 2008) | 1 line
  
  Replaced LinkedList with generic List interface
........

Modified:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/   (props changed)
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListUtils.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBlockBox.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PageBreaker.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/SpaceResolver.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/FootnoteLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java

Propchange: xmlgraphics/fop/branches/Temp_AFPGOCAResources/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jun  9 07:33:04 2008
@@ -1 +1 @@
-/xmlgraphics/fop/trunk:1-665691
+/xmlgraphics/fop/trunk:1-665701

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java Mon Jun  9 07:33:04 2008
@@ -38,7 +38,7 @@
     /** Cell layout manager. */
     private TableCellLayoutManager cellLM;
     /** List of Knuth elements representing the contents of the cell. */
-    private LinkedList elements;
+    private List elements;
 
     /** Index of the row where this cell starts. */
     private int rowIndex;
@@ -106,11 +106,11 @@
      *
      * @param elements a list of ListElement (?)
      */
-    public void setElements(LinkedList elements) {
+    public void setElements(List elements) {
         this.elements = elements;
     }
 
-    public LinkedList getElements() {
+    public List getElements() {
         return this.elements;
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java Mon Jun  9 07:33:04 2008
@@ -211,7 +211,7 @@
      * getNextKnuthElements() implementation(s) that are to be called. 
      * @return LinkedList of Knuth elements.  
      */
-    protected abstract LinkedList getNextKnuthElements(LayoutContext context, int alignment);
+    protected abstract List getNextKnuthElements(LayoutContext context, int alignment);
 
     /** @return true if there's no content that could be handled. */
     public boolean isEmpty() {
@@ -549,7 +549,7 @@
         childLC.signalSpanChange(Constants.NOT_SET);
         
         BlockSequence blockList;
-        LinkedList returnedList = getNextKnuthElements(childLC, alignment);
+        List returnedList = getNextKnuthElements(childLC, alignment);
         if (returnedList != null) {
             if (returnedList.size() == 0) {
                 nextSequenceStartsOn = handleSpanChange(childLC, nextSequenceStartsOn);
@@ -561,8 +561,10 @@
             nextSequenceStartsOn = handleSpanChange(childLC, nextSequenceStartsOn);
             
             Position breakPosition = null;
-            if (((KnuthElement) returnedList.getLast()).isForcedBreak()) {
-                KnuthPenalty breakPenalty = (KnuthPenalty)returnedList.removeLast();
+            if (((KnuthElement) returnedList.get(returnedList.size() - 1))
+                    .isForcedBreak()) {
+                KnuthPenalty breakPenalty = (KnuthPenalty) returnedList
+                        .remove(returnedList.size() - 1);
                 breakPosition = breakPenalty.getPosition();
                 switch (breakPenalty.getBreakClass()) {
                 case Constants.EN_PAGE:

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -20,14 +20,12 @@
 package org.apache.fop.layoutmgr;
 
 import java.util.ArrayList;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.area.Area;
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.fo.Constants;
@@ -152,7 +150,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context,
+    public List getNextKnuthElements(LayoutContext context,
                                            int alignment) {
         log.warn("null implementation of getNextKnuthElements() called!");
         setFinished(true);
@@ -160,7 +158,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getChangedKnuthElements(List oldList,
+    public List getChangedKnuthElements(List oldList,
                                               int alignment) {
         log.warn("null implementation of getChangeKnuthElement() called!");
         return null;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -189,7 +189,7 @@
     }
     
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         resetSpaces();
         if (isAbsoluteOrFixed()) {
             return getNextKnuthElementsAbsolute(context, alignment);
@@ -247,9 +247,9 @@
         
         MinOptMax stackLimit = new MinOptMax(relDims.bpd);
 
-        LinkedList returnedList;
-        LinkedList contentList = new LinkedList();
-        LinkedList returnList = new LinkedList();
+        List returnedList;
+        List contentList = new LinkedList();
+        List returnList = new LinkedList();
         
         if (!breakBeforeServed) {
             try {
@@ -291,7 +291,7 @@
                     childLC.clearKeepWithPreviousPending();
                 }
                 if (returnedList.size() == 1
-                        && ((ListElement)returnedList.getFirst()).isForcedBreak()) {
+                        && ((ListElement)returnedList.get(0)).isForcedBreak()) {
                     // a descendant of this block has break-before
                     /*
                     if (returnList.size() == 0) {
@@ -321,7 +321,8 @@
                         //Avoid NoSuchElementException below (happens with empty blocks)
                         continue;
                     }
-                    if (((ListElement)returnedList.getLast()).isForcedBreak()) {
+                    if (((ListElement) returnedList
+                            .get(returnedList.size() - 1)).isForcedBreak()) {
                         // a descendant of this block has break-after
                         if (curLM.isFinished()) {
                             // there is no other content in this block;
@@ -392,7 +393,7 @@
         return returnList;
     }
     
-    private LinkedList getNextKnuthElementsAbsolute(LayoutContext context, int alignment) {
+    private List getNextKnuthElementsAbsolute(LayoutContext context, int alignment) {
         autoHeight = false;
 
         boolean switchedProgressionDirection
@@ -515,7 +516,7 @@
             }
             updateRelDims(0, 0, false);
         }
-        LinkedList returnList = new LinkedList();
+        List returnList = new LinkedList();
         if (!breaker.isEmpty()) {
             Position bcPosition = new BlockContainerPosition(this, breaker);
             returnList.add(new KnuthBox(0, notifyPos(bcPosition), false));
@@ -622,9 +623,9 @@
             return lc;
         }
         
-        protected LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+        protected List getNextKnuthElements(LayoutContext context, int alignment) {
             LayoutManager curLM; // currently active LM
-            LinkedList returnList = new LinkedList();
+            List returnList = new LinkedList();
 
             while ((curLM = getChildLM()) != null) {
                 LayoutContext childLC = new LayoutContext(0);
@@ -632,7 +633,7 @@
                 childLC.setRefIPD(context.getRefIPD());
                 childLC.setWritingMode(getBlockContainerFO().getWritingMode());
                 
-                LinkedList returnedList = null;
+                List returnedList = null;
                 if (!curLM.isFinished()) {
                     returnedList = curLM.getNextKnuthElements(childLC, alignment);
                 }
@@ -723,7 +724,7 @@
 
         // "unwrap" the NonLeafPositions stored in parentIter
         // and put them in a new list;
-        LinkedList positionList = new LinkedList();
+        List positionList = new LinkedList();
         Position pos;
         boolean bSpaceBefore = false;
         boolean bSpaceAfter = false;
@@ -798,10 +799,11 @@
                 //    // the last item inside positionList is a Position;
                 //    // this means that the paragraph has been split
                 //    // between consecutive pages
-                LinkedList splitList = new LinkedList();
+                List splitList = new LinkedList();
                 int splitLength = 0;
-                int iFirst = ((MappingPosition) positionList.getFirst()).getFirstIndex();
-                int iLast = ((MappingPosition) positionList.getLast()).getLastIndex();
+                int iFirst = ((MappingPosition) positionList.get(0)).getFirstIndex();
+                int iLast = ((MappingPosition) positionList.get(positionList
+                        .size() - 1)).getLastIndex();
                 // copy from storedList to splitList all the elements from
                 // iFirst to iLast
                 ListIterator storedListIterator = storedList.listIterator(iFirst);

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -113,7 +113,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         resetSpaces(); 
         return super.getNextKnuthElements(context, alignment);
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -63,7 +63,7 @@
     /** space-after value adjusted for block-progression-unit handling */
     protected int adjustedSpaceAfter = 0;
     /** Only used to store the original list when createUnitElements is called */
-    protected LinkedList storedList = null;
+    protected List storedList = null;
     /** Indicates whether break before has been served or not */
     protected boolean breakBeforeServed = false;
     /** Indicates whether the first visible mark has been returned by this LM, yet */
@@ -235,7 +235,7 @@
     }
     
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         //log.debug("BLM.getNextKnuthElements> keep-together = "
               // + layoutProps.keepTogether.getType());
         //log.debug(" keep-with-previous = " +
@@ -249,9 +249,9 @@
         
         updateContentAreaIPDwithOverconstrainedAdjust();
 
-        LinkedList returnedList = null;
-        LinkedList contentList = new LinkedList();
-        LinkedList returnList = new LinkedList();
+        List returnedList = null;
+        List contentList = new LinkedList();
+        List returnList = new LinkedList();
 
         if (!breakBeforeServed) {
             try {
@@ -303,11 +303,11 @@
             }
             if (returnedList != null
                     && returnedList.size() == 1
-                    && ((ListElement) returnedList.getFirst()).isForcedBreak()) {
+                    && ((ListElement) returnedList.get(0)).isForcedBreak()) {
 
                 if (curLM.isFinished() && !hasNextChildLM()) {
                     // a descendant of this block has break-before
-                    forcedBreakAfterLast = (BreakElement) returnedList.getFirst();
+                    forcedBreakAfterLast = (BreakElement) returnedList.get(0);
                     context.clearPendingMarks();
                     break;
                 }
@@ -344,10 +344,12 @@
                     continue;
                 }
                 contentList.addAll(returnedList);
-                if (((ListElement) returnedList.getLast()).isForcedBreak()) {
+                if (((ListElement) returnedList.get(returnedList.size() - 1))
+                        .isForcedBreak()) {
                     // a descendant of this block has break-after
                     if (curLM.isFinished() && !hasNextChildLM()) {
-                        forcedBreakAfterLast = (BreakElement)contentList.removeLast();
+                        forcedBreakAfterLast = (BreakElement) contentList
+                                .remove(contentList.size() - 1);
                         context.clearPendingMarks();
                         break;
                     }
@@ -414,7 +416,7 @@
      * @param context the current layout context
      * @param childLC the currently active child layout context
      */
-    protected void addInBetweenBreak(LinkedList contentList, LayoutContext context,
+    protected void addInBetweenBreak(List contentList, LayoutContext context,
             LayoutContext childLC) {
         if (mustKeepTogether() 
                 || context.isKeepWithNextPending()
@@ -438,7 +440,8 @@
             return;
         }
         
-        ListElement last = (ListElement)contentList.getLast(); 
+        ListElement last = (ListElement) contentList
+                .get(contentList.size() - 1); 
         if (last.isGlue()) {
             // the last element in contentList is a glue;
             // it is a feasible breakpoint, there is no need to add
@@ -585,7 +588,7 @@
     /**
      * {@inheritDoc} 
      */
-    public LinkedList getChangedKnuthElements(List oldList, int alignment) {
+    public List getChangedKnuthElements(List oldList, int alignment) {
 /*LF*/  //log.debug("");
 /*LF*/  //log.debug("  BLM.getChangedKnuthElements> inizio: oldList.size() = " 
         //  + oldList.size());
@@ -593,8 +596,8 @@
         KnuthElement returnedElement;
         KnuthElement currElement = null;
         KnuthElement prevElement = null;
-        LinkedList returnedList = new LinkedList();
-        LinkedList returnList = new LinkedList();
+        List returnedList = new LinkedList();
+        List returnList = new LinkedList();
         int fromIndex = 0;
 
         // "unwrap" the Positions stored in the elements
@@ -691,7 +694,9 @@
                     // add an infinite penalty to forbid a break between blocks
                     returnedList.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, 
                             new Position(this), false));
-                } else if (bSomethingAdded && !((KnuthElement) returnedList.getLast()).isGlue()) {
+                } else if (bSomethingAdded
+                        && !((KnuthElement) returnedList.get(returnedList
+                                .size() - 1)).isGlue()) {
                     // add a null penalty to allow a break between blocks
                     returnedList.add(new KnuthPenalty(0, 0, false, new Position(this), false));
                 }
@@ -711,7 +716,7 @@
                 // there are no more elements to add
                 // remove the last penalty added to returnedList
                 if (returnedList.size() > 0) {
-                    returnedList.removeLast();
+                    returnedList.remove(returnedList.size() - 1);
                 }
                 //log.debug(" BLM.getChangedKnuthElements> elementi propri, ignorati, da " 
                 //  + fromIndex + " a " + workList.size());
@@ -943,7 +948,7 @@
      * @param isFirst true if this is the first time a layout manager instance needs to generate 
      *                border and padding
      */
-    protected void addKnuthElementsForBorderPaddingBefore(LinkedList returnList, boolean isFirst) {
+    protected void addKnuthElementsForBorderPaddingBefore(List returnList, boolean isFirst) {
         //Border and Padding (before)
         CommonBorderPaddingBackground borderAndPadding = getBorderPaddingBackground();
         if (borderAndPadding != null) {
@@ -970,7 +975,7 @@
      * @param isLast true if this is the last time a layout manager instance needs to generate 
      *               border and padding
      */
-    protected void addKnuthElementsForBorderPaddingAfter(LinkedList returnList, boolean isLast) {
+    protected void addKnuthElementsForBorderPaddingAfter(List returnList, boolean isLast) {
         //Border and Padding (after)
         CommonBorderPaddingBackground borderAndPadding = getBorderPaddingBackground();
         if (borderAndPadding != null) {
@@ -997,7 +1002,7 @@
      * @param context the layout context
      * @return true if an element has been added due to a break-before.
      */
-    protected boolean addKnuthElementsForBreakBefore(LinkedList returnList, 
+    protected boolean addKnuthElementsForBreakBefore(List returnList, 
             LayoutContext context) {
         int breakBefore = -1;
         if (fobj instanceof org.apache.fop.fo.flow.Block) {
@@ -1030,7 +1035,7 @@
      * @param context the layout context
      * @return true if an element has been added due to a break-after.
      */
-    protected boolean addKnuthElementsForBreakAfter(LinkedList returnList, 
+    protected boolean addKnuthElementsForBreakAfter(List returnList, 
             LayoutContext context) {
         int breakAfter = -1;
         if (fobj instanceof org.apache.fop.fo.flow.Block) {
@@ -1062,7 +1067,7 @@
      * @param returnList return list to add the additional elements to
      * @param alignment vertical alignment
      */
-    protected void addKnuthElementsForSpaceBefore(LinkedList returnList/*, 
+    protected void addKnuthElementsForSpaceBefore(List returnList/*, 
             Position returnPosition*/, int alignment) {
         SpaceProperty spaceBefore = getSpaceBeforeProperty();
         // append elements representing space-before
@@ -1111,7 +1116,7 @@
      * @param returnList return list to add the additional elements to
      * @param alignment vertical alignment
      */
-    protected void addKnuthElementsForSpaceAfter(LinkedList returnList/*, Position returnPosition*/, 
+    protected void addKnuthElementsForSpaceAfter(List returnList/*, Position returnPosition*/, 
                 int alignment) {
         SpaceProperty spaceAfter = getSpaceAfterProperty();
         // append elements representing space-after
@@ -1156,22 +1161,22 @@
         }*/
     }
 
-    protected LinkedList createUnitElements(LinkedList oldList) {
+    protected List createUnitElements(List oldList) {
         //log.debug("Start conversion: " + oldList.size() 
         //  + " elements, space-before.min=" + layoutProps.spaceBefore.getSpace().min
         //  + " space-after.min=" + layoutProps.spaceAfter.getSpace().min);
         // add elements at the beginning and at the end of oldList
         // representing minimum spaces
-        LayoutManager lm = ((KnuthElement)oldList.getFirst()).getLayoutManager();
+        LayoutManager lm = ((KnuthElement)oldList.get(0)).getLayoutManager();
         boolean bAddedBoxBefore = false;
         boolean bAddedBoxAfter = false;
         if (adjustedSpaceBefore > 0) {
-            oldList.addFirst(new KnuthBox(adjustedSpaceBefore,
+            oldList.add(0, new KnuthBox(adjustedSpaceBefore,
                                           new Position(lm), true));
             bAddedBoxBefore = true;
         }
         if (adjustedSpaceAfter > 0) {
-            oldList.addLast(new KnuthBox(adjustedSpaceAfter,
+            oldList.add(new KnuthBox(adjustedSpaceAfter,
                                          new Position(lm), true));
             bAddedBoxAfter = true;
         }
@@ -1399,10 +1404,10 @@
         // remove elements at the beginning and at the end of oldList
         // representing minimum spaces
         if (adjustedSpaceBefore > 0) {
-            oldList.removeFirst();
+            oldList.remove(0);
         }
         if (adjustedSpaceAfter > 0) {
-            oldList.removeLast();
+            oldList.remove(oldList.size() - 1);
         }
 
         // if space-before.conditionality is "discard", correct newList

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListUtils.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListUtils.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListUtils.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListUtils.java Mon Jun  9 07:33:04 2008
@@ -38,7 +38,7 @@
      * @param constraint min/opt/max value to restrict the range in which the breaks are removed.
      * @return true if the opt constraint is bigger than the list contents
      */
-    public static boolean removeLegalBreaks(LinkedList elements, MinOptMax constraint) {
+    public static boolean removeLegalBreaks(List elements, MinOptMax constraint) {
         return removeLegalBreaks(elements, constraint.opt);
     }
 
@@ -50,7 +50,7 @@
      * @param constraint value to restrict the range in which the breaks are removed.
      * @return true if the constraint is bigger than the list contents
      */
-    public static boolean removeLegalBreaks(LinkedList elements, int constraint) {
+    public static boolean removeLegalBreaks(List elements, int constraint) {
         int len = 0;
         ListIterator iter = elements.listIterator();
         while (iter.hasNext()) {
@@ -97,7 +97,7 @@
      * @param constraint value to restrict the range in which the breaks are removed.
      * @return true if the constraint is bigger than the list contents
      */
-    public static boolean removeLegalBreaksFromEnd(LinkedList elements, int constraint) {
+    public static boolean removeLegalBreaksFromEnd(List elements, int constraint) {
         int len = 0;
         ListIterator i = elements.listIterator(elements.size());
         while (i.hasPrevious()) {
@@ -184,8 +184,8 @@
      * @param elems the element list
      * @return true if the list ends with a forced break
      */
-    public static boolean endsWithForcedBreak(LinkedList elems) {
-        ListElement last = (ListElement)elems.getLast();
+    public static boolean endsWithForcedBreak(List elems) {
+        ListElement last = (ListElement) elems.get(elems.size() - 1);
         return last.isForcedBreak();
     }
 
@@ -195,8 +195,8 @@
      * @param elems the element list
      * @return true if the list ends with a non-infinite penalty
      */
-    public static boolean endsWithNonInfinitePenalty(LinkedList elems) {
-        ListElement last = (ListElement)elems.getLast();
+    public static boolean endsWithNonInfinitePenalty(List elems) {
+        ListElement last = (ListElement) elems.get(elems.size() - 1);
         if (last.isPenalty() && ((KnuthPenalty)last).getP() < KnuthElement.INFINITE) {
             return true;
         } else if (last instanceof BreakElement

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -64,7 +64,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
 
         // set layout dimensions
         int flowIPD = getCurrentPV().getCurrentSpan().getColumnWidth();
@@ -72,8 +72,8 @@
 
         // currently active LM
         LayoutManager curLM;
-        LinkedList returnedList;
-        LinkedList returnList = new LinkedList();
+        List returnedList;
+        List returnList = new LinkedList();
 
         while ((curLM = getChildLM()) != null) {
             if (!(curLM instanceof WrapperLayoutManager)
@@ -114,7 +114,7 @@
             }
 
             // "wrap" the Position inside each element
-            LinkedList tempList = returnedList;
+            List tempList = returnedList;
             returnedList = new LinkedList();
             wrapPositionElements(tempList, returnedList);
 
@@ -213,11 +213,11 @@
     }
     
     /** {@inheritDoc} */
-    public LinkedList getChangedKnuthElements(List oldList, /*int flaggedPenalty,*/ int alignment) {
+    public List getChangedKnuthElements(List oldList, /*int flaggedPenalty,*/ int alignment) {
         ListIterator oldListIterator = oldList.listIterator();
         KnuthElement returnedElement;
-        LinkedList returnedList = new LinkedList();
-        LinkedList returnList = new LinkedList();
+        List returnedList = new LinkedList();
+        List returnList = new LinkedList();
         KnuthElement prevElement = null;
         KnuthElement currElement = null;
         int fromIndex = 0;
@@ -257,7 +257,8 @@
                     // add an infinite penalty to forbid a break between blocks
                     returnedList.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, 
                             new Position(this), false));
-                } else if (!((KnuthElement) returnedList.getLast()).isGlue()) {
+                } else if (!((KnuthElement) returnedList.get(returnedList
+                        .size() - 1)).isGlue()) {
                     // add a null penalty to allow a break between blocks
                     returnedList.add(new KnuthPenalty(0, 0, false, new Position(this), false));
                 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBlockBox.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBlockBox.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBlockBox.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBlockBox.java Mon Jun  9 07:33:04 2008
@@ -19,9 +19,10 @@
 
 package org.apache.fop.layoutmgr;
 
-import org.apache.fop.traits.MinOptMax;
-
 import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.fop.traits.MinOptMax;
 
 /**
  * Knuth box used to represent a line in block-progression-dimension (i.e. the width is its height).
@@ -34,9 +35,9 @@
      * it isn't possible to get the opt value stored in a MinOptMax object.
      */
     private int bpd;
-    private LinkedList footnoteList;
+    private List footnoteList;
     /** List of Knuth elements. This is a list of LinkedList elements. */
-    private LinkedList elementLists = null;
+    private List elementLists = null;
 
     /**
      * Creates a new box.
@@ -61,7 +62,7 @@
      * @param pos the Position stored in this box
      * @param bAux is this box auxiliary?
      */
-    public KnuthBlockBox(int w, LinkedList list, Position pos, boolean bAux) {
+    public KnuthBlockBox(int w, List list, Position pos, boolean bAux) {
         super(w, pos, bAux);
         ipdRange = new MinOptMax(0);
         bpd = 0;
@@ -71,7 +72,7 @@
     /**
      * @return the LMs for the footnotes cited in this box.
      */
-    public LinkedList getFootnoteBodyLMs() {
+    public List getFootnoteBodyLMs() {
         return footnoteList;
     }
 
@@ -86,7 +87,7 @@
      * Adds the given list of Knuth elements to this box' list of elements.
      * @param list elements corresponding to a footnote body
      */
-    public void addElementList(LinkedList list) {
+    public void addElementList(List list) {
         if (elementLists == null) {
             elementLists = new LinkedList();
         }
@@ -98,7 +99,7 @@
      * @return a list of KnuthElement sequences corresponding to footnotes cited in this
      * box
      */
-    public LinkedList getElementLists() {
+    public List getElementLists() {
         return elementLists;
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManager.java Mon Jun  9 07:33:04 2008
@@ -19,7 +19,6 @@
  
 package org.apache.fop.layoutmgr;
 
-import java.util.LinkedList;
 import java.util.List;
 
 import org.apache.fop.area.Area;
@@ -138,7 +137,7 @@
      * @param alignment the desired text alignement
      * @return          the list of KnuthElements
      */
-    LinkedList getNextKnuthElements(LayoutContext context, int alignment);
+    List getNextKnuthElements(LayoutContext context, int alignment);
 
     /**
      * Get a sequence of KnuthElements representing the content 
@@ -175,7 +174,7 @@
      * @param alignment      the desired text alignment
      * @return               the updated list of KnuthElements
      */
-    LinkedList getChangedKnuthElements(List oldList, int alignment);
+    List getChangedKnuthElements(List oldList, int alignment);
     
     /**
      * Returns the IPD of the content area

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PageBreaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PageBreaker.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PageBreaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PageBreaker.java Mon Jun  9 07:33:04 2008
@@ -135,8 +135,8 @@
     }
     
     /** {@inheritDoc} */
-    protected LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
-        LinkedList contentList = null;
+    protected List getNextKnuthElements(LayoutContext context, int alignment) {
+        List contentList = null;
         
         while (!childFLM.isFinished() && contentList == null) {
             contentList = childFLM.getNextKnuthElements(context, alignment);
@@ -156,7 +156,7 @@
                     footnoteContext.setStackLimitBP(context.getStackLimitBP());
                     footnoteContext.setRefIPD(pslm.getCurrentPV()
                             .getRegionReference(Constants.FO_REGION_BODY).getIPD());
-                    LinkedList footnoteBodyLMs = ((KnuthBlockBox) element).getFootnoteBodyLMs();
+                    List footnoteBodyLMs = ((KnuthBlockBox) element).getFootnoteBodyLMs();
                     ListIterator footnoteBodyIterator = footnoteBodyLMs.listIterator();
                     // store the lists of elements representing the footnote bodies
                     // in the box representing the line containing their references

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java Mon Jun  9 07:33:04 2008
@@ -21,11 +21,11 @@
 
 import java.util.ArrayList;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.ListIterator;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.layoutmgr.AbstractBreaker.PageBreakPosition;
@@ -230,7 +230,7 @@
      * @param elementLists list of KnuthElement sequences corresponding to the footnotes
      * bodies
      */
-    private void handleFootnotes(LinkedList elementLists) {
+    private void handleFootnotes(List elementLists) {
         // initialization
         if (!footnotesPending) {
             footnotesPending = true;
@@ -286,7 +286,7 @@
         return returnValue;
     }
 
-    private void resetFootnotes(LinkedList elementLists) {
+    private void resetFootnotes(List elementLists) {
         for (int i = 0; i < elementLists.size(); i++) {
             /*LinkedList removedList = (LinkedList)*/footnotesList.remove(footnotesList.size() - 1);
             lengthList.remove(lengthList.size() - 1);

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/SpaceResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/SpaceResolver.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/SpaceResolver.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/SpaceResolver.java Mon Jun  9 07:33:04 2008
@@ -614,7 +614,7 @@
      * Resolves unresolved elements applying the space resolution rules defined in 4.3.1.
      * @param elems the element list
      */
-    public static void resolveElementList(LinkedList elems) {
+    public static void resolveElementList(List elems) {
         if (log.isTraceEnabled()) {
             log.trace(elems);
         }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -87,7 +87,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         if (true) {
             throw new UnsupportedOperationException(
                 "Shouldn't this method be emptied because it's never called at all?");
@@ -102,8 +102,8 @@
         BlockLevelLayoutManager curLM;
         BlockLevelLayoutManager prevLM = null;
         MinOptMax stackSize = new MinOptMax();
-        LinkedList returnedList;
-        LinkedList returnList = new LinkedList();
+        List returnedList;
+        List returnList = new LinkedList();
 
         while ((curLM = ((BlockLevelLayoutManager) getChildLM())) != null) {
             if (curLM instanceof InlineLevelLayoutManager) {
@@ -125,7 +125,7 @@
             //    + returnedList.size());
 
             // "wrap" the Position inside each element
-            LinkedList tempList = returnedList;
+            List tempList = returnedList;
             KnuthElement tempElement;
             returnedList = new LinkedList();
             ListIterator listIter = tempList.listIterator();
@@ -136,8 +136,8 @@
             }
 
             if (returnedList.size() == 1
-                && ((KnuthElement)returnedList.getFirst()).isPenalty()
-                && ((KnuthPenalty)returnedList.getFirst()).getP() == -KnuthElement.INFINITE) {
+                && ((KnuthElement)returnedList.get(0)).isPenalty()
+                && ((KnuthPenalty)returnedList.get(0)).getP() == -KnuthElement.INFINITE) {
                 // a descendant of this flow has break-before
                 returnList.addAll(returnedList);
                 return returnList;
@@ -150,16 +150,18 @@
                         returnList.add(new KnuthPenalty(0, 
                                 KnuthElement.INFINITE, false, 
                                 new Position(this), false));
-                    } else if (!((KnuthElement) returnList.getLast()).isGlue()) {
+                    } else if (!((KnuthElement) returnList.get(returnList
+                            .size() - 1)).isGlue()) {
                         // add a null penalty to allow a break between blocks
                         returnList.add(new KnuthPenalty(0, 0, false, new Position(this), false));
                     }
                 }
 /*LF*/          if (returnedList.size() > 0) { // controllare!
                     returnList.addAll(returnedList);
-                    if (((KnuthElement)returnedList.getLast()).isPenalty()
-                            && ((KnuthPenalty)returnedList.getLast()).getP() 
-                                    == -KnuthElement.INFINITE) {
+                    final KnuthElement last = (KnuthElement) returnedList
+                            .get(returnedList.size() - 1);
+                    if (last.isPenalty()
+                            && ((KnuthPenalty) last).getP() == -KnuthElement.INFINITE) {
                         // a descendant of this flow has break-after
 /*LF*/                  //log.debug("FLM - break after!!");
                         return returnList;
@@ -325,9 +327,9 @@
             return lc;
         }
         
-        protected LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+        protected List getNextKnuthElements(LayoutContext context, int alignment) {
             LayoutManager curLM; // currently active LM
-            LinkedList returnList = new LinkedList();
+            List returnList = new LinkedList();
 
             while ((curLM = getChildLM()) != null) {
                 LayoutContext childLC = new LayoutContext(0);
@@ -335,7 +337,7 @@
                 childLC.setRefIPD(context.getRefIPD());
                 childLC.setWritingMode(context.getWritingMode());
 
-                LinkedList returnedList = null;
+                List returnedList = null;
                 //The following is a HACK! Ignore leading and trailing white space 
                 boolean ignore = curLM instanceof TextLayoutManager;
                 if (!curLM.isFinished()) {

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -21,7 +21,7 @@
 
 import java.awt.Dimension;
 import java.awt.Rectangle;
-import java.util.LinkedList;
+import java.util.List;
 
 import org.apache.fop.area.Area;
 import org.apache.fop.area.inline.Viewport;
@@ -104,7 +104,7 @@
     }
     
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context,
+    public List getNextKnuthElements(LayoutContext context,
                                            int alignment) {
         Viewport areaCurrent = getInlineArea();
         setCurrentArea(areaCurrent);

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -90,7 +90,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         MinOptMax ipd;
         curArea = get(context);
         KnuthSequence seq = new InlineKnuthSequence();
@@ -179,7 +179,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getChangedKnuthElements(List oldList, int alignment) {
+    public List getChangedKnuthElements(List oldList, int alignment) {
         if (isFinished()) {
             return null;
         }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -27,8 +27,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.Block;
 import org.apache.fop.area.LineArea;
@@ -131,7 +129,7 @@
 
         stackSize = 0;
 
-        LinkedList contentList =
+        List contentList =
             getNextKnuthElements(childLC, Constants.EN_START);
         ListIterator contentIter = contentList.listIterator();
         while (contentIter.hasNext()) {
@@ -254,9 +252,9 @@
         }
     }
 
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
-        LinkedList contentList = new LinkedList();
-        LinkedList returnedList;
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
+        List contentList = new LinkedList();
+        List returnedList;
 
         childLM.initialize();
         while (!childLM.isFinished()) {
@@ -267,7 +265,7 @@
                 // move elements to contentList, and accumulate their size
                KnuthElement contentElement;
                while (returnedList.size() > 0) {
-                    Object obj = returnedList.removeFirst();
+                    Object obj = returnedList.remove(0);
                     if (obj instanceof KnuthSequence) {
                         KnuthSequence ks = (KnuthSequence)obj;
                         for (Iterator it = ks.iterator(); it.hasNext(); ) {
@@ -312,7 +310,7 @@
         return false;
     }
 
-    public LinkedList getChangedKnuthElements(List oldList,
+    public List getChangedKnuthElements(List oldList,
                                               /*int flaggedPenalty,*/
                                               int alignment) {
         return null;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/FootnoteLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/FootnoteLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/FootnoteLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/FootnoteLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -71,7 +71,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context,
+    public List getNextKnuthElements(LayoutContext context,
                                            int alignment) {
         // for the moment, this LM is set as the citationLM's parent
         // later on, when this LM will have nothing more to do, the citationLM's parent
@@ -82,9 +82,9 @@
         bodyLM.initialize();
 
         // get Knuth elements representing the footnote citation
-        LinkedList returnedList = new LinkedList();
+        List returnedList = new LinkedList();
         while (!citationLM.isFinished()) {
-            LinkedList partialList = citationLM.getNextKnuthElements(context, alignment);
+            List partialList = citationLM.getNextKnuthElements(context, alignment);
             if (partialList != null) {
                 returnedList.addAll(partialList);
             }
@@ -122,9 +122,9 @@
     /**
      * {@inheritDoc} 
      */
-    public LinkedList getChangedKnuthElements(List oldList,
+    public List getChangedKnuthElements(List oldList,
                                               int alignment) {
-        LinkedList returnedList = super.getChangedKnuthElements(oldList, alignment);
+        List returnedList = super.getChangedKnuthElements(oldList, alignment);
         addAnchor(returnedList);
         return returnedList;
     }
@@ -164,7 +164,7 @@
      * Find the last box in the sequence, and add a reference to the FootnoteBodyLM
      * @param citationList the list of elements representing the footnote citation
      */
-    private void addAnchor(LinkedList citationList) {
+    private void addAnchor(List citationList) {
         KnuthInlineBox lastBox = null;
         // the list of elements is searched backwards, until we find a box
         ListIterator citationIterator = citationList.listIterator(citationList.size());

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -233,14 +233,14 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         LayoutManager curLM;
 
         // the list returned by child LM
-        LinkedList returnedList;
+        List returnedList;
 
         // the list which will be returned to the parent LM
-        LinkedList returnList = new LinkedList();
+        List returnList = new LinkedList();
         KnuthSequence lastSequence = null;
 
         SpaceSpecifier leadingSpace = context.getLeadingSpace();
@@ -367,7 +367,8 @@
                 context.updateKeepWithNextPending(childLC.getKeepWithNextPending());
                 childLC.clearKeepsPending();
             }
-            lastSequence = (KnuthSequence) returnList.getLast();
+            lastSequence = (KnuthSequence) returnList
+                    .get(returnList.size() - 1);
             lastChildLM = curLM;
         }
         
@@ -432,7 +433,7 @@
         // set in the layout context, it must be also set in the
         // layout context given to lastLM, but must be cleared in the
         // layout context given to the other LMs.
-        LinkedList positionList = new LinkedList();
+        List positionList = new LinkedList();
         NonLeafPosition pos;
         LayoutManager lastLM = null;// last child LM in this iterator
         Position lastPos = null;
@@ -533,8 +534,8 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getChangedKnuthElements(List oldList, int alignment) {
-        LinkedList returnedList = new LinkedList();
+    public List getChangedKnuthElements(List oldList, int alignment) {
+        List returnedList = new LinkedList();
         addKnuthElementsForBorderPaddingStart(returnedList);
         returnedList.addAll(super.getChangedKnuthElements(oldList, alignment));
         addKnuthElementsForBorderPaddingEnd(returnedList);

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -364,7 +364,7 @@
     /**
      * {@inheritDoc} 
      */
-    public LinkedList getChangedKnuthElements(List oldList, int alignment) {
+    public List getChangedKnuthElements(List oldList, int alignment) {
         // "unwrap" the Positions stored in the elements
         ListIterator oldListIterator = oldList.listIterator();
         KnuthElement oldElement;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -52,7 +52,7 @@
     private Leader fobj;
     private Font font = null;
     
-    private LinkedList contentList = null;
+    private List contentList = null;
     private ContentLayoutManager clm = null;
     
     private int contentAreaIPD = 0;
@@ -230,7 +230,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context,
+    public List getNextKnuthElements(LayoutContext context,
                                            int alignment) {
         MinOptMax ipd;
         curArea = get(context);
@@ -305,13 +305,13 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getChangedKnuthElements(List oldList,
+    public List getChangedKnuthElements(List oldList,
                                               int alignment) {
         if (isFinished()) {
             return null;
         }
 
-        LinkedList returnList = new LinkedList();
+        List returnList = new LinkedList();
 
         addKnuthElementsForBorderPaddingStart(returnList);
         

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -249,7 +249,7 @@
     }
     
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         curArea = get(context);
         
         if (curArea == null) {
@@ -313,7 +313,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getChangedKnuthElements(List oldList,
+    public List getChangedKnuthElements(List oldList,
                                               int alignment) {
         if (isFinished()) {
             return null;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -574,7 +574,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         FontInfo fi = fobj.getFOEventHandler().getFontInfo();
         FontTriplet[] fontkeys = fobj.getCommonFont().getFontState(fi);
         Font fs = fi.getFontInstance(fontkeys[0], fobj.getCommonFont().fontSize.getValue(this));
@@ -644,7 +644,7 @@
         LayoutContext inlineLC = new LayoutContext(context);
         
         InlineLevelLayoutManager curLM;
-        LinkedList returnedList = null;
+        List returnedList = null;
         iLineWidth = context.getStackLimitIP().opt;
             
         // convert all the text in a sequence of paragraphs made
@@ -666,7 +666,7 @@
             }
             
             if (lastPar != null) {
-                KnuthSequence firstSeq = (KnuthSequence) returnedList.getFirst();
+                KnuthSequence firstSeq = (KnuthSequence) returnedList.get(0);
                 
                 // finish last paragraph before a new block sequence
                 if (!firstSeq.isInlineSequence()) {
@@ -901,7 +901,7 @@
      * @param context the layout context
      * @return a list of Knuth elements representing broken lines
      */
-    private LinkedList createLineBreaks(int alignment, LayoutContext context) {
+    private List createLineBreaks(int alignment, LayoutContext context) {
 
         // find the optimal line breaking points for each paragraph
         ListIterator paragraphsIterator
@@ -1048,9 +1048,9 @@
      * @param context the layout context
      * @return the newly built element list
      */
-    private LinkedList postProcessLineBreaks(int alignment, LayoutContext context) {
+    private List postProcessLineBreaks(int alignment, LayoutContext context) {
     
-        LinkedList returnList = new LinkedList();
+        List returnList = new LinkedList();
         
         for (int p = 0; p < knuthParagraphs.size(); p++) {
             // penalty between paragraphs
@@ -1068,7 +1068,7 @@
             KnuthSequence seq = (KnuthSequence) knuthParagraphs.get(p);
 
             if (!seq.isInlineSequence()) {
-                LinkedList targetList = new LinkedList();
+                List targetList = new LinkedList();
                 ListIterator listIter = seq.listIterator();
                 while (listIter.hasNext()) {
                     ListElement tempElement;
@@ -1110,7 +1110,7 @@
                       = ((LineBreakPosition) llPoss.getChosenPosition(i)).getLeafPos();
                     // create a list of the FootnoteBodyLM handling footnotes 
                     // whose citations are in this line
-                    LinkedList footnoteList = new LinkedList();
+                    List footnoteList = new LinkedList();
                     ListIterator elementIterator = seq.listIterator(startIndex);
                     while (elementIterator.nextIndex() <= endIndex) {
                         KnuthElement element = (KnuthElement) elementIterator.next();
@@ -1334,8 +1334,8 @@
     /**
      * {@inheritDoc} 
      */
-    public LinkedList getChangedKnuthElements(List oldList, int alignment) {
-        LinkedList returnList = new LinkedList();
+    public List getChangedKnuthElements(List oldList, int alignment) {
+        List returnList = new LinkedList();
         for (int p = 0; p < knuthParagraphs.size(); p++) {
             LineLayoutPossibilities llPoss;
             llPoss = (LineLayoutPossibilities)lineLayoutsList.get(p);
@@ -1384,7 +1384,7 @@
         ListIterator currParIterator
             = currPar.listIterator(currPar.ignoreAtStart);
         // list of TLM involved in hyphenation
-        LinkedList updateList = new LinkedList();
+        List updateList = new LinkedList();
         KnuthElement firstElement = null;
         KnuthElement nextElement = null;
         // current InlineLevelLayoutManager
@@ -1497,7 +1497,7 @@
                 .applyChanges(currPar.subList(fromIndex + iAddedElements,
                                               toIndex + iAddedElements))) {
                 // insert the new KnuthElements
-                LinkedList newElements = null;
+                List newElements = null;
                 newElements
                     = currUpdate.inlineLM.getChangedKnuthElements
                     (currPar.subList(fromIndex + iAddedElements,

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -523,12 +523,12 @@
     }
     
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(final LayoutContext context, final int alignment) {
+    public List getNextKnuthElements(final LayoutContext context, final int alignment) {
         this.lineStartBAP = context.getLineStartBorderAndPaddingWidth();
         this.lineEndBAP = context.getLineEndBorderAndPaddingWidth();
         this.alignmentContext = context.getAlignmentContext();
 
-        final LinkedList returnList = new LinkedList();
+        final List returnList = new LinkedList();
         KnuthSequence sequence = new InlineKnuthSequence();
         AreaInfo ai = null;
         AreaInfo prevAi = null;
@@ -624,9 +624,9 @@
             sequence = this.processLinebreak(returnList, sequence);
         }
 
-        if (((List)returnList.getLast()).size() == 0) {
+        if (((List) returnList.get(returnList.size() - 1)).isEmpty()) {
             //Remove an empty sequence because of a trailing newline
-            returnList.removeLast();
+            returnList.remove(returnList.size() - 1);
         }
         
         this.setFinished(true);
@@ -637,7 +637,7 @@
         }
     }
 
-    private KnuthSequence processLinebreak(final LinkedList returnList,
+    private KnuthSequence processLinebreak(final List returnList,
             KnuthSequence sequence) {
         if (this.lineEndBAP != 0) {
             sequence.add(
@@ -942,7 +942,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getChangedKnuthElements(final List oldList,
+    public List getChangedKnuthElements(final List oldList,
                                               final int alignment) {
         if (this.isFinished()) {
             return null;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -115,9 +115,9 @@
     }
     
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         resetSpaces(); 
-        LinkedList returnList = super.getNextKnuthElements(context, alignment);
+        List returnList = super.getNextKnuthElements(context, alignment);
 
         //fox:widow-content-limit
         int widowRowLimit = getListBlockFO().getWidowContentLimit().getValue(); 
@@ -135,7 +135,7 @@
     }
    
     /** {@inheritDoc} */
-    public LinkedList getChangedKnuthElements(List oldList, int alignment) {
+    public List getChangedKnuthElements(List oldList, int alignment) {
         //log.debug("LBLM.getChangedKnuthElements>");
         return super.getChangedKnuthElements(oldList, alignment);
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -98,7 +98,7 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getChangedKnuthElements(List oldList, int alignment) {
+    public List getChangedKnuthElements(List oldList, int alignment) {
         //log.debug("  ListItemContentLayoutManager.getChanged>");
         return super.getChangedKnuthElements(oldList, alignment);
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -72,8 +72,8 @@
 
     private Block curBlockArea = null;
 
-    private LinkedList labelList = null;
-    private LinkedList bodyList = null;
+    private List labelList = null;
+    private List bodyList = null;
 
     private boolean discardBorderBefore;
     private boolean discardBorderAfter;
@@ -190,11 +190,11 @@
     }
     
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         referenceIPD = context.getRefIPD();
         LayoutContext childLC;
         
-        LinkedList returnList = new LinkedList();
+        List returnList = new LinkedList();
         
         if (!breakBeforeServed) {
             try {
@@ -243,7 +243,7 @@
         this.keepWithNextPendingOnBody = childLC.getKeepWithNextPending();
 
         // create a combined list
-        LinkedList returnedList = getCombinedKnuthElementsForListItem(labelList, bodyList, context);
+        List returnedList = getCombinedKnuthElementsForListItem(labelList, bodyList, context);
 
         // "wrap" the Position inside each element
         wrapPositionElements(returnedList, returnList, true);
@@ -262,10 +262,9 @@
         return returnList;
     }
 
-    private LinkedList getCombinedKnuthElementsForListItem(LinkedList labelElements,
-                                                           LinkedList bodyElements,
-                                                           LayoutContext context) {
-        //Copy elements to array lists to improve element access performance
+    private List getCombinedKnuthElementsForListItem(List labelElements,
+            List bodyElements, LayoutContext context) {
+        // Copy elements to array lists to improve element access performance
         List[] elementLists = {new ArrayList(labelElements),
                                new ArrayList(bodyElements)};
         int[] fullHeights = {ElementListUtils.calcContentLength(elementLists[0]),
@@ -429,7 +428,7 @@
     /**
      * {@inheritDoc} 
      */
-    public LinkedList getChangedKnuthElements(List oldList, int alignment) {
+    public List getChangedKnuthElements(List oldList, int alignment) {
         //log.debug(" LILM.getChanged> label");
         // label
         labelList = label.getChangedKnuthElements(labelList, alignment);
@@ -458,9 +457,9 @@
             }
         }
 
-        LinkedList returnedList = body.getChangedKnuthElements(oldList, alignment);
+        List returnedList = body.getChangedKnuthElements(oldList, alignment);
         // "wrap" the Position inside each element
-        LinkedList tempList = returnedList;
+        List tempList = returnedList;
         KnuthElement tempElement;
         returnedList = new LinkedList();
         ListIterator listIter = tempList.listIterator();

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -21,10 +21,10 @@
 
 import java.util.Iterator;
 import java.util.LinkedList;
+import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.flow.table.EffRow;
 import org.apache.fop.fo.flow.table.GridUnit;
@@ -116,7 +116,7 @@
                     childLC.setRefIPD(spanWidth);
                     
                     //Get the element list for the cell contents
-                    LinkedList elems = primary.getCellLM().getNextKnuthElements(
+                    List elems = primary.getCellLM().getNextKnuthElements(
                                             childLC, alignment);
                     ElementListObserver.observe(elems, "table-cell", primary.getCell().getId());
                     primary.setElements(elems);
@@ -124,7 +124,7 @@
             }
         }
         computeRowHeights();
-        LinkedList elements = tableStepper.getCombinedKnuthElementsForRowGroup(context,
+        List elements = tableStepper.getCombinedKnuthElementsForRowGroup(context,
                 rowGroup, bodyType);
         returnList.addAll(elements);
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -20,13 +20,14 @@
 package org.apache.fop.layoutmgr.table;
 
 import java.util.LinkedList;
+import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.area.Area;
 import org.apache.fop.area.Block;
 import org.apache.fop.area.Trait;
+import org.apache.fop.fo.flow.ListItem;
 import org.apache.fop.fo.flow.table.ConditionalBorder;
 import org.apache.fop.fo.flow.table.GridUnit;
 import org.apache.fop.fo.flow.table.PrimaryGridUnit;
@@ -126,16 +127,16 @@
     /**
      * {@inheritDoc}
      */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         MinOptMax stackLimit = new MinOptMax(context.getStackLimitBP());
 
         referenceIPD = context.getRefIPD();
         cellIPD = referenceIPD;
         cellIPD -= getIPIndents();
 
-        LinkedList returnedList;
-        LinkedList contentList = new LinkedList();
-        LinkedList returnList = new LinkedList();
+        List returnedList;
+        List contentList = new LinkedList();
+        List returnList = new LinkedList();
 
         BlockLevelLayoutManager curLM; // currently active LM
         BlockLevelLayoutManager prevLM = null; // previously active LM
@@ -187,13 +188,15 @@
         }
         //Space resolution
         SpaceResolver.resolveElementList(returnList);
-        if (((KnuthElement) returnList.getFirst()).isForcedBreak()) {
-            primaryGridUnit.setBreakBefore(((KnuthPenalty) returnList.getFirst()).getBreakClass());
-            returnList.removeFirst();
+        if (((KnuthElement) returnList.get(0)).isForcedBreak()) {
+            primaryGridUnit.setBreakBefore(((KnuthPenalty) returnList.get(0)).getBreakClass());
+            returnList.remove(0);
             assert !returnList.isEmpty();
         }
-        if (((KnuthElement) returnList.getLast()).isForcedBreak()) {
-            KnuthPenalty p = (KnuthPenalty) returnList.getLast();
+        final KnuthElement lastItem = (KnuthElement) returnList
+                .get(returnList.size() - 1);
+        if (((KnuthElement) lastItem).isForcedBreak()) {
+            KnuthPenalty p = (KnuthPenalty) lastItem;
             primaryGridUnit.setBreakAfter(p.getBreakClass());
             p.setP(0);
         }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java?rev=665703&r1=665702&r2=665703&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java Mon Jun  9 07:33:04 2008
@@ -178,9 +178,9 @@
     }
 
     /** {@inheritDoc} */
-    public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
+    public List getNextKnuthElements(LayoutContext context, int alignment) {
         
-        LinkedList returnList = new LinkedList();
+        List returnList = new LinkedList();
 
         /*
          * Compute the IPD and adjust it if necessary (overconstrained)
@@ -271,8 +271,8 @@
         int breakBefore = BreakUtil.compareBreakClasses(getTable().getBreakBefore(),
                 childLC.getBreakBefore());
         if (breakBefore != Constants.EN_AUTO) {
-            returnList.addFirst(new BreakElement(getAuxiliaryPosition(), 
-                    0, -KnuthElement.INFINITE, breakBefore, context));
+            returnList.add(0, new BreakElement(getAuxiliaryPosition(), 0,
+                    -KnuthElement.INFINITE, breakBefore, context));
         }
 
         //addKnuthElementsForBreakAfter(returnList, context);



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org