From 2466f253400d1ec0f7c4bc6f68a8dab87a3ab87e Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 11 Sep 2006 18:24:35 +0000 Subject: 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 --- src/java/org/apache/fop/fo/flow/Table.java | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'src/java/org/apache/fop/fo/flow/Table.java') 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; } -- cgit v1.2.3