]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Added support for table border-*-precedence properties in the table
authorFinn Bock <bckfnn@apache.org>
Fri, 26 Aug 2005 07:07:06 +0000 (07:07 +0000)
committerFinn Bock <bckfnn@apache.org>
Fri, 26 Aug 2005 07:07:06 +0000 (07:07 +0000)
fo objects.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@240173 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/FOPropertyMapping.java
src/java/org/apache/fop/fo/flow/Table.java
src/java/org/apache/fop/fo/flow/TableBody.java
src/java/org/apache/fop/fo/flow/TableCell.java
src/java/org/apache/fop/fo/flow/TableColumn.java
src/java/org/apache/fop/fo/flow/TableRow.java

index 4b0d50bc64e1ff4c6728ab66f8b4c813ac178808..f49d4d94ea417ac4f87a941eca4851e650702815 100644 (file)
@@ -50,6 +50,7 @@ import org.apache.fop.fo.properties.SpaceProperty;
 import org.apache.fop.fo.properties.SpacePropertyMaker;
 import org.apache.fop.fo.properties.SpacingPropertyMaker;
 import org.apache.fop.fo.properties.StringProperty;
+import org.apache.fop.fo.properties.TableBorderPrecedence;
 import org.apache.fop.fo.properties.TextDecorationProperty;
 import org.apache.fop.fo.properties.ToBeImplementedProperty;
 
@@ -2304,15 +2305,15 @@ public class FOPropertyMapping implements Constants {
         PropertyMaker sub;
 
         // border-after-precedence
-        m  = new ToBeImplementedProperty.Maker(PR_BORDER_AFTER_PRECEDENCE);
+        m  = new TableBorderPrecedence(PR_BORDER_AFTER_PRECEDENCE);
         m.setInherited(false);
-        m.setDefault("none");
+        m.addEnum("force", getEnumProperty(EN_FORCE, "FORCE"));
         addPropertyMaker("border-after-precedence", m);
 
         // border-before-precedence
-        m  = new ToBeImplementedProperty.Maker(PR_BORDER_BEFORE_PRECEDENCE);
+        m  = new TableBorderPrecedence(PR_BORDER_BEFORE_PRECEDENCE);
         m.setInherited(false);
-        m.setDefault("none");
+        m.addEnum("force", getEnumProperty(EN_FORCE, "FORCE"));
         addPropertyMaker("border-before-precedence", m);
 
         // border-collapse
@@ -2326,9 +2327,9 @@ public class FOPropertyMapping implements Constants {
         addPropertyMaker("border-collapse", m);
 
         // border-end-precedence
-        m  = new ToBeImplementedProperty.Maker(PR_BORDER_END_PRECEDENCE);
+        m  = new TableBorderPrecedence(PR_BORDER_END_PRECEDENCE);
         m.setInherited(false);
-        m.setDefault("none");
+        m.addEnum("force", getEnumProperty(EN_FORCE, "FORCE"));
         addPropertyMaker("border-end-precedence", m);
 
         // border-separation
@@ -2346,9 +2347,9 @@ public class FOPropertyMapping implements Constants {
         addPropertyMaker("border-separation", m);
 
         // border-start-precedence
-        m  = new ToBeImplementedProperty.Maker(PR_BORDER_START_PRECEDENCE);
+        m  = new TableBorderPrecedence(PR_BORDER_START_PRECEDENCE);
         m.setInherited(false);
-        m.setDefault("none");
+        m.addEnum("force", getEnumProperty(EN_FORCE, "FORCE"));
         addPropertyMaker("border-start-precedence", m);
 
         // caption-side
index 3d770442586d94bc86da1d9a33791e39dc154ede..45182c71d077a2b712eabf5ad0bf6d71636ba42e 100644 (file)
 
 package org.apache.fop.fo.flow;
 
-import org.xml.sax.Locator;
-
 import java.util.List;
 
+import org.xml.sax.Locator;
+
 import org.apache.fop.apps.FOPException;
+import org.apache.fop.datatypes.Numeric;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.PropertyList;
@@ -48,12 +49,12 @@ public class Table extends FObj {
     private CommonMarginBlock commonMarginBlock;
     private CommonRelativePosition commonRelativePosition;
     private LengthRangeProperty blockProgressionDimension;
-    // private ToBeImplementedProperty borderAfterPrecedence;
-    // private ToBeImplementedProperty borderBeforePrecedence;
+    private Numeric borderAfterPrecedence;
+    private Numeric borderBeforePrecedence;
     private int borderCollapse;
-    // private ToBeImplementedProperty borderEndPrecedence;
+    private Numeric borderEndPrecedence;
     private LengthPairProperty borderSeparation;
-    // private ToBeImplementedProperty borderStartPrecedence;
+    private Numeric borderStartPrecedence;
     private int breakAfter;
     private int breakBefore;
     private String id;
@@ -105,12 +106,12 @@ public class Table extends FObj {
         commonMarginBlock = pList.getMarginBlockProps();
         commonRelativePosition = pList.getRelativePositionProps();
         blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
-        // borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE);
-        // borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE);
+        borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE).getNumeric();
+        borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE).getNumeric();
         borderCollapse = pList.get(PR_BORDER_COLLAPSE).getEnum();
-        // borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE);
+        borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE).getNumeric();
         borderSeparation = pList.get(PR_BORDER_SEPARATION).getLengthPair();
-        // borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE);
+        borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE).getNumeric();
         breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
         id = pList.get(PR_ID).getString();
@@ -125,7 +126,7 @@ public class Table extends FObj {
         tableOmitHeaderAtBreak = pList.get(PR_TABLE_OMIT_HEADER_AT_BREAK).getEnum();
         //width = pList.get(PR_WIDTH).getLength();
         writingMode = pList.get(PR_WRITING_MODE).getEnum();
-        
+
         //Create default column in case no table-columns will be defined.
         defaultColumn = new TableColumn(this);
         PropertyList colPList = new StaticPropertyList(defaultColumn, pList);
index b12b4bd0844b768baa3458a3774eb170b0f17f54..f5d91e6a41538be44080f3125ccc42998fb805a9 100644 (file)
@@ -25,6 +25,7 @@ import java.util.List;
 import org.xml.sax.Locator;
 
 import org.apache.fop.apps.FOPException;
+import org.apache.fop.datatypes.Numeric;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.PropertyList;
@@ -44,10 +45,10 @@ public class TableBody extends FObj {
     private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonRelativePosition commonRelativePosition;
-    // private ToBeImplementedProperty borderAfterPrecedence;
-    // private ToBeImplementedProperty borderBeforePrecedence;
-    // private ToBeImplementedProperty borderEndPrecedence;
-    // private ToBeImplementedProperty borderStartPrecedence;
+    private Numeric borderAfterPrecedence;
+    private Numeric borderBeforePrecedence;
+    private Numeric borderEndPrecedence;
+    private Numeric borderStartPrecedence;
     private int visibility;
     // End of property values
     
@@ -71,10 +72,10 @@ public class TableBody extends FObj {
         commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonRelativePosition = pList.getRelativePositionProps();
-        // borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE);
-        // borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE);
-        // borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE);
-        // borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE);
+        borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE).getNumeric();
+        borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE).getNumeric();
+        borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE).getNumeric();
+        borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE).getNumeric();
         visibility = pList.get(PR_VISIBILITY).getEnum();
         
         //Used by convertCellsToRows()
index e46f09cb0030a0d2680a716476658d450fd6afab..3951c35154c57c28b61b6ea7d6ac94cbc4ec9d18 100644 (file)
@@ -44,10 +44,10 @@ public class TableCell extends FObj {
     private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonRelativePosition commonRelativePosition;
-    // private ToBeImplementedProperty borderAfterPrecedence;
-    // private ToBeImplementedProperty borderBeforePrecedence;
-    // private ToBeImplementedProperty borderEndPrecedence;
-    // private ToBeImplementedProperty borderStartPrecedence;
+    private Numeric borderAfterPrecedence;
+    private Numeric borderBeforePrecedence;
+    private Numeric borderEndPrecedence;
+    private Numeric borderStartPrecedence;
     private LengthRangeProperty blockProgressionDimension;
     private int borderCollapse; //inherited from fo:table
     private LengthPairProperty borderSeparation; //inherited from fo:table
@@ -118,10 +118,10 @@ public class TableCell extends FObj {
         commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonRelativePosition = pList.getRelativePositionProps();
-        // borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE);
-        // borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE);
-        // borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE);
-        // borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE);
+        borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE).getNumeric();
+        borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE).getNumeric();
+        borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE).getNumeric();
+        borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE).getNumeric();
         blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
         borderCollapse = pList.get(PR_BORDER_COLLAPSE).getEnum();
         borderSeparation = pList.get(PR_BORDER_SEPARATION).getLengthPair();
index 2f8bf5ada31a2005e49bd83ac48a90ea5406526a..8a87dcc28d8bd6bc70c91ddc20d944a5bd539daf 100644 (file)
@@ -37,10 +37,10 @@ import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
 public class TableColumn extends FObj {
     // The value of properties relevant for fo:table-column.
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    // private ToBeImplementedProperty borderAfterPrecedence;
-    // private ToBeImplementedProperty borderBeforePrecedence;
-    // private ToBeImplementedProperty borderEndPrecedence;
-    // private ToBeImplementedProperty borderStartPrecedence;
+    private Numeric borderAfterPrecedence;
+    private Numeric borderBeforePrecedence;
+    private Numeric borderEndPrecedence;
+    private Numeric borderStartPrecedence;
     private Numeric columnNumber;
     private Length columnWidth;
     private Numeric numberColumnsRepeated;
@@ -60,10 +60,10 @@ public class TableColumn extends FObj {
      */
     public void bind(PropertyList pList) throws FOPException {
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        // borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE);
-        // borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE);
-        // borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE);
-        // borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE);
+        borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE).getNumeric();
+        borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE).getNumeric();
+        borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE).getNumeric();
+        borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE).getNumeric();
         columnNumber = pList.get(PR_COLUMN_NUMBER).getNumeric();
         columnWidth = pList.get(PR_COLUMN_WIDTH).getLength();
         numberColumnsRepeated = pList.get(PR_NUMBER_COLUMNS_REPEATED).getNumeric();
index 222c36b12ddc10d64aeeb9de6c149e86341f3567..516be056e1eb93a08db4a9b968fc802959d79687 100644 (file)
@@ -22,6 +22,7 @@ import org.xml.sax.Locator;
 
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.datatypes.Length;
+import org.apache.fop.datatypes.Numeric;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.PropertyList;
@@ -43,10 +44,10 @@ public class TableRow extends FObj {
     private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonRelativePosition commonRelativePosition;
-    // private ToBeImplementedProperty borderAfterPrecedence;
-    // private ToBeImplementedProperty borderBeforePrecedence;
-    // private ToBeImplementedProperty borderEndPrecedence;
-    // private ToBeImplementedProperty borderStartPrecedence;
+    private Numeric borderAfterPrecedence;
+    private Numeric borderBeforePrecedence;
+    private Numeric borderEndPrecedence;
+    private Numeric borderStartPrecedence;
     private int breakAfter;
     private int breakBefore;
     private Length height;
@@ -75,10 +76,10 @@ public class TableRow extends FObj {
         commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonRelativePosition = pList.getRelativePositionProps();
-        // borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE);
-        // borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE);
-        // borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE);
-        // borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE);
+        borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE).getNumeric();
+        borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE).getNumeric();
+        borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE).getNumeric();
+        borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE).getNumeric();
         breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
         id = pList.get(PR_ID).getString();