+++ /dev/null
-/*
- * 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());
- }
- }
-}
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
* @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) {
// 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);
}
}
return ((getPaddingBefore(false, context) + getPaddingAfter(false, context)
+ getPaddingStart(false, context) + getPaddingEnd(false, context)) > 0);
}
+
}