diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2007-08-03 08:19:58 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2007-08-03 08:19:58 +0000 |
commit | 72797e71cd3460cc73b17cddbb1ec6c650053751 (patch) | |
tree | 592114b7d1417cb5c20cd4675a16f0f2824636db /src/java/org/apache/fop | |
parent | 89829841e46887b2cc2ed16153a7202ad11f2775 (diff) | |
download | xmlgraphics-fop-72797e71cd3460cc73b17cddbb1ec6c650053751.tar.gz xmlgraphics-fop-72797e71cd3460cc73b17cddbb1ec6c650053751.zip |
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
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java | 26 |
1 files changed, 14 insertions, 12 deletions
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) |