aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/properties
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2005-09-15 10:49:13 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2005-09-15 10:49:13 +0000
commit3eda983da52ead591e36044e42da5b8fb7e3cb08 (patch)
tree3cb2cab72d9e12d31ba3781424570bdd7cdfcb4a /src/java/org/apache/fop/fo/properties
parentc84f2250df9928f6b03549ba9691ab82deb241ca (diff)
downloadxmlgraphics-fop-3eda983da52ead591e36044e42da5b8fb7e3cb08.tar.gz
xmlgraphics-fop-3eda983da52ead591e36044e42da5b8fb7e3cb08.zip
Removal of ColumnNumberPropertyMaker.java (until all further conflicts have been resolved)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@289198 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/properties')
-rw-r--r--src/java/org/apache/fop/fo/properties/ColumnNumberPropertyMaker.java50
-rwxr-xr-xsrc/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java10
-rw-r--r--src/java/org/apache/fop/fo/properties/NumberProperty.java2
-rw-r--r--src/java/org/apache/fop/fo/properties/TableBorderPrecedence.java4
4 files changed, 9 insertions, 57 deletions
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
index 5e3b4ae7d..000000000
--- a/src/java/org/apache/fop/fo/properties/ColumnNumberPropertyMaker.java
+++ /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());
- }
- }
-}
diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
index ecdec78c8..c4ba929bd 100755
--- a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
+++ b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
@@ -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);
}
+
}
diff --git a/src/java/org/apache/fop/fo/properties/NumberProperty.java b/src/java/org/apache/fop/fo/properties/NumberProperty.java
index c3f3788e0..6ed092110 100644
--- a/src/java/org/apache/fop/fo/properties/NumberProperty.java
+++ b/src/java/org/apache/fop/fo/properties/NumberProperty.java
@@ -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.
diff --git a/src/java/org/apache/fop/fo/properties/TableBorderPrecedence.java b/src/java/org/apache/fop/fo/properties/TableBorderPrecedence.java
index 674cc8205..696a2c98e 100644
--- a/src/java/org/apache/fop/fo/properties/TableBorderPrecedence.java
+++ b/src/java/org/apache/fop/fo/properties/TableBorderPrecedence.java
@@ -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 {