diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-09-11 18:24:35 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-09-11 18:24:35 +0000 |
commit | 2466f253400d1ec0f7c4bc6f68a8dab87a3ab87e (patch) | |
tree | 75eb326342f941d01902022ebb4a5ed989dec12c /src/java/org/apache/fop/fo/flow/Table.java | |
parent | 3fe8aa56c053a08463fa90966677d840d7af612d (diff) | |
download | xmlgraphics-fop-2466f253400d1ec0f7c4bc6f68a8dab87a3ab87e.tar.gz xmlgraphics-fop-2466f253400d1ec0f7c4bc6f68a8dab87a3ab87e.zip |
Implemented limited support for extension properties through new methods on ElementMapping (backwards-compatible).
Moved block-progression-unit into the fox: namespace.
Implemented new extension properties: fox:orphan-content-limit and fox:widow-content-limit for fo:table and fo:list-block. See documentation for details.
Bugfix in ElementListUtils.removeLegalBreaks (concerning box/glue combinations). Added a unit test to cover the problem.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@442282 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow/Table.java')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/Table.java | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/fo/flow/Table.java b/src/java/org/apache/fop/fo/flow/Table.java index ac3fc95ee..079909c73 100644 --- a/src/java/org/apache/fop/fo/flow/Table.java +++ b/src/java/org/apache/fop/fo/flow/Table.java @@ -67,6 +67,10 @@ public class Table extends TableFObj { private int tableOmitFooterAtBreak; private int tableOmitHeaderAtBreak; private int writingMode; + + /** extension properties */ + private Length widowContentLimit; + private Length orphanContentLimit; private static final int MINCOLWIDTH = 10000; // 10pt @@ -126,6 +130,10 @@ public class Table extends TableFObj { tableOmitHeaderAtBreak = pList.get(PR_TABLE_OMIT_HEADER_AT_BREAK).getEnum(); writingMode = pList.get(PR_WRITING_MODE).getEnum(); super.bind(pList); + + //Bind extension properties + widowContentLimit = pList.get(PR_X_WIDOW_CONTENT_LIMIT).getLength(); + orphanContentLimit = pList.get(PR_X_ORPHAN_CONTENT_LIMIT).getLength(); if (borderCollapse != EN_SEPARATE) { //TODO Remove once the collapsing border is at least marginally working. @@ -449,10 +457,18 @@ public class Table extends TableFObj { public LengthPairProperty getBorderSeparation() { return borderSeparation; } + + /** @return the "fox:widow-content-limit" extension property */ + public Length getWidowContentLimit() { + return widowContentLimit; + } - /** - * @return the "id" property. - */ + /** @return the "fox:orphan-content-limit" extension property */ + public Length getOrphanContentLimit() { + return orphanContentLimit; + } + + /** @return the "id" property. */ public String getId() { return id; } @@ -462,9 +478,7 @@ public class Table extends TableFObj { return "table"; } - /** - * @see org.apache.fop.fo.FObj#getNameId() - */ + /** @see org.apache.fop.fo.FObj#getNameId() */ public int getNameId() { return FO_TABLE; } |