]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Removal of ColumnNumberPropertyMaker.java (until all further conflicts have been...
authorAndreas L. Delmelle <adelmelle@apache.org>
Thu, 15 Sep 2005 10:49:13 +0000 (10:49 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Thu, 15 Sep 2005 10:49:13 +0000 (10:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@289198 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/properties/ColumnNumberPropertyMaker.java [deleted file]
src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
src/java/org/apache/fop/fo/properties/NumberProperty.java
src/java/org/apache/fop/fo/properties/TableBorderPrecedence.java

diff --git a/src/java/org/apache/fop/fo/properties/ColumnNumberPropertyMaker.java b/src/java/org/apache/fop/fo/properties/ColumnNumberPropertyMaker.java
deleted file mode 100644 (file)
index 5e3b4ae..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.fo.properties;
-
-import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.PropertyList;
-import org.apache.fop.fo.expr.PropertyException;
-import org.apache.fop.fo.flow.TableFObj;
-
-public class ColumnNumberPropertyMaker extends NumberProperty.Maker {
-
-    public ColumnNumberPropertyMaker(int propId) {
-        super(propId);
-    }
-    
-    /**
-     * Set default column-number from parent's currentColumnIndex
-     * 
-     * @return  the default value for column-number
-     */
-    public Property make(PropertyList propertyList) throws PropertyException {
-        FObj fo = propertyList.getFObj();
-        
-        if( fo.getNameId() == Constants.FO_TABLE_CELL 
-                || fo.getNameId() == Constants.FO_TABLE_COLUMN ) {
-            TableFObj parent = (TableFObj) propertyList.getParentFObj();
-            return new NumberProperty(parent.getCurrentColumnIndex());
-        } else {
-            throw new PropertyException("column-number property is only allowed on " 
-                    + "fo:table-cell or fo:table-column, not on " + fo.getName());
-        }
-    }
-}
index ecdec78c851bd8f01d71342ca7ee01df4a4e0dec..c4ba929bd6234d80d1df8bf2d1d3897f8310fb61 100755 (executable)
@@ -75,7 +75,7 @@ public class CommonBorderPaddingBackground implements Cloneable {
     public static final int START = 2;
     /** the "end" edge */ 
     public static final int END = 3;
-
+    
     public static class BorderInfo implements Cloneable {
         private int mStyle; // Enum for border style
         private ColorType mColor; // Border color
@@ -139,6 +139,7 @@ public class CommonBorderPaddingBackground implements Cloneable {
      * @throws PropertyException if there's an error while binding the properties
      */
     public CommonBorderPaddingBackground(PropertyList pList, FObj fobj) throws PropertyException {
+        
         backgroundAttachment = pList.get(Constants.PR_BACKGROUND_ATTACHMENT).getEnum();
         backgroundColor = pList.get(Constants.PR_BACKGROUND_COLOR).getColorType();
         if (backgroundColor.getAlpha() == 0) {
@@ -201,9 +202,9 @@ public class CommonBorderPaddingBackground implements Cloneable {
         // If style = none, force width to 0, don't get Color (spec 7.7.20)
         int style = pList.get(styleProp).getEnum();
         if (style != Constants.EN_NONE) {
-            setBorderInfo(new BorderInfo(style, 
-                    pList.get(widthProp).getCondLength(), 
-                    pList.get(colorProp).getColorType()), side);
+            setBorderInfo(new BorderInfo(style,
+                pList.get(widthProp).getCondLength(),
+                pList.get(colorProp).getColorType()), side);
         }
     }
     
@@ -364,4 +365,5 @@ public class CommonBorderPaddingBackground implements Cloneable {
         return ((getPaddingBefore(false, context) + getPaddingAfter(false, context) 
                 + getPaddingStart(false, context) + getPaddingEnd(false, context)) > 0);
     }
+    
 }
index c3f3788e0e4a1f14a6373bc29064e01557bb6809..6ed09211083360a9f4dec12921bfdbe1425544b5 100644 (file)
@@ -86,7 +86,7 @@ public class NumberProperty extends Property implements Numeric {
     public NumberProperty(int num) {
         this.number = new Integer(num);
     }
-
+    
     /**
      * Plain number always has a dimension of 0.
      * @return a dimension of 0.
index 674cc8205d925a2d33c89bf7d428fe1a4313b538..696a2c98e7c835840ccd2a2b97ba75b24416a0a6 100644 (file)
@@ -37,8 +37,8 @@ public class TableBorderPrecedence extends NumberProperty.Maker{
     }
     
     /**
-     * Recalculate the line-height value based on the nearest specified
-     * value.
+     * Set default precedence according to the parent FObj
+     * 
      * @see PropertyMaker#compute(PropertyList)
      */
     public Property make(PropertyList propertyList) throws PropertyException {