diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2008-02-25 11:30:43 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2008-02-25 11:30:43 +0000 |
commit | 5250c87d0ea8ff16a23973244a3c9a410f44272b (patch) | |
tree | e0fa6daecfb2a674f0a9d5a3226ce3e26dead3ce /src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java | |
parent | d28d3ac902aecdb442cfb2f01986bcb1a1b30f04 (diff) | |
download | xmlgraphics-fop-5250c87d0ea8ff16a23973244a3c9a410f44272b.tar.gz xmlgraphics-fop-5250c87d0ea8ff16a23973244a3c9a410f44272b.zip |
- added full support for keep-with-previous on table-row and in table-cell
- added more testcases for keeps in tables
- assign the right table-row element to grid units that are not on the first row spanned
- slightly re-worked the RowGroupBuilder interface to make it more SAX-like
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@630814 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java b/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java index c95f3f8c3..1a47a7dcf 100644 --- a/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java +++ b/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java @@ -52,6 +52,8 @@ public class PrimaryGridUnit extends GridUnit { private boolean isSeparateBorderModel; private int halfBorderSeparationBPD; + private boolean keepWithPrevious; + private boolean keepWithNext; private int breakBefore = Constants.EN_AUTO; private int breakAfter = Constants.EN_AUTO; @@ -59,11 +61,10 @@ public class PrimaryGridUnit extends GridUnit { * Creates a new primary grid unit. * * @param cell table cell which occupies this grid unit - * @param row the table-row element this grid unit belongs to (if any) * @param colIndex index of the column this grid unit belongs to, zero-based */ - PrimaryGridUnit(TableCell cell, TableRow row, int colIndex) { - super(cell, row, 0, 0); + PrimaryGridUnit(TableCell cell, int colIndex) { + super(cell, 0, 0); this.colIndex = colIndex; this.isSeparateBorderModel = cell.getTable().isSeparateBorderModel(); // TODO this.halfBorderSeparationBPD = cell.getTable().getBorderSeparation().getBPD().getLength() @@ -325,6 +326,40 @@ public class PrimaryGridUnit extends GridUnit { } /** + * Returns true if the first child block (or its descendants) of this cell has + * keep-with-previous. + * + * @return the value of keep-with-previous + */ + public boolean mustKeepWithPrevious() { + return keepWithPrevious; + } + + /** + * Don't use, reserved for TableCellLM. TODO + */ + public void setKeepWithPrevious() { + this.keepWithPrevious = true; + } + + /** + * Returns true if the last child block (or its descendants) of this cell has + * keep-with-next. + * + * @return the value of keep-with-next + */ + public boolean mustKeepWithNext() { + return keepWithNext; + } + + /** + * Don't use, reserved for TableCellLM. TODO + */ + public void setKeepWithNext() { + this.keepWithNext = true; + } + + /** * Returns the class of the before break for the first child element of this cell. * * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN}, {@link |