From 72797e71cd3460cc73b17cddbb1ec6c650053751 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Fri, 3 Aug 2007 08:19:58 +0000 Subject: Clean up: - 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 --- .../fop/layoutmgr/table/RowGroupLayoutManager.java | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src/java/org/apache/fop') diff --git a/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java index a72243bc0..235580b54 100644 --- a/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java @@ -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) -- cgit v1.2.3