]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Clean up:
authorVincent Hennebert <vhennebert@apache.org>
Fri, 3 Aug 2007 08:19:58 +0000 (08:19 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Fri, 3 Aug 2007 08:19:58 +0000 (08:19 +0000)
- organize imports
- javadoc for getBreakBefore/After
- loop no longer necessary when calling TableCellLM.getNextKnuthElements

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@562383 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java

index a72243bc044b51cfaaafacabedb0a748b8c657c4..235580b5433ff0a0173b9a3d2d3a2dd8067a2c4f 100644 (file)
@@ -37,7 +37,6 @@ import org.apache.fop.layoutmgr.KnuthPenalty;
 import org.apache.fop.layoutmgr.LayoutContext;
 import org.apache.fop.layoutmgr.ListElement;
 import org.apache.fop.layoutmgr.MinOptMaxUtil;
-import org.apache.fop.layoutmgr.Position;
 import org.apache.fop.traits.MinOptMax;
 
 class RowGroupLayoutManager {
@@ -66,6 +65,12 @@ class RowGroupLayoutManager {
         this.tableStepper = tableStepper;
     }
 
+    /**
+     * 
+     * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN},
+     * {@link Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, or
+     * {@link Constants#EN_ODD_PAGE}
+     */
     int getBreakBefore() {
         TableRow rowFO = rowGroup[0].getTableRow();
         if (rowFO == null) {
@@ -75,6 +80,12 @@ class RowGroupLayoutManager {
         }
     }
 
+    /**
+     * 
+     * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN},
+     * {@link Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, or
+     * {@link Constants#EN_ODD_PAGE}
+     */
     int getBreakAfter() {
         TableRow rowFO = rowGroup[rowGroup.length - 1].getTableRow();
         if (rowFO == null) {
@@ -98,8 +109,7 @@ class RowGroupLayoutManager {
         context.setFlags(LayoutContext.KEEP_WITH_NEXT_PENDING, false);
 
         //Element list creation
-        createElementsForRowGroup(context, alignment, bodyType, 
-                returnList, rowGroup);
+        createElementsForRowGroup(context, alignment, bodyType, returnList);
 
         //Handle keeps
         if (context.isKeepWithNextPending()) {
@@ -233,8 +243,7 @@ class RowGroupLayoutManager {
      * @param rowGroup row group to process
      */
     private void createElementsForRowGroup(LayoutContext context, int alignment, 
-            int bodyType, LinkedList returnList, 
-            EffRow[] rowGroup) {
+            int bodyType, LinkedList returnList) {
         log.debug("Handling row group with " + rowGroup.length + " rows...");
         MinOptMax[] rowHeights = new MinOptMax[rowGroup.length];
         MinOptMax[] explicitRowHeights = new MinOptMax[rowGroup.length];
@@ -298,13 +307,6 @@ class RowGroupLayoutManager {
                         //Get the element list for the cell contents
                         LinkedList elems = primary.getCellLM().getNextKnuthElements(
                                                 childLC, alignment);
-                        //Temporary? Multiple calls in case of break conditions.
-                        //TODO Revisit when table layout is restartable
-                        while (!primary.getCellLM().isFinished()) {
-                            LinkedList additionalElems = primary.getCellLM().getNextKnuthElements(
-                                    childLC, alignment);
-                            elems.addAll(additionalElems);
-                        }
                         ElementListObserver.observe(elems, "table-cell", primary.getCell().getId());
 
                         if ((elems.size() > 0)