diff options
author | Simon Pepping <spepping@apache.org> | 2004-12-22 08:54:10 +0000 |
---|---|---|
committer | Simon Pepping <spepping@apache.org> | 2004-12-22 08:54:10 +0000 |
commit | 2ca1efa3177579a4da21ee1097193ab57cc09419 (patch) | |
tree | 77345ff9a7236cd319c382683d3cb250d75cea2a /src/java/org/apache/fop/fo/flow/InlineLevel.java | |
parent | d5d34b4c18eb338c8d077df37fbba698dc878975 (diff) | |
download | xmlgraphics-fop-2ca1efa3177579a4da21ee1097193ab57cc09419.tar.gz xmlgraphics-fop-2ca1efa3177579a4da21ee1097193ab57cc09419.zip |
Removed instances of InlineStackingLayoutManager. Created a new FO
node class, InlineLevel, a subclass of FObjMixed, a base class for
several inline-level FObj: Inline, Leader, Title. The
InlineLayoutManager constructor requires an FObj of this type.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198205 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow/InlineLevel.java')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/InlineLevel.java | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fo/flow/InlineLevel.java b/src/java/org/apache/fop/fo/flow/InlineLevel.java new file mode 100644 index 000000000..5ce0a611c --- /dev/null +++ b/src/java/org/apache/fop/fo/flow/InlineLevel.java @@ -0,0 +1,112 @@ +/* + * Copyright 2004 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.flow; + +import java.util.List; + +import org.apache.fop.apps.FOPException; +import org.apache.fop.datatypes.ColorType; +import org.apache.fop.datatypes.Length; +import org.apache.fop.fo.FONode; +import org.apache.fop.fo.FObjMixed; +import org.apache.fop.fo.PropertyList; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBorderPaddingBackground; +import org.apache.fop.fo.properties.CommonFont; +import org.apache.fop.fo.properties.CommonMarginInline; +import org.apache.fop.layoutmgr.InlineLayoutManager; + +/** + * Class modelling the commonalities of several inline-level + * formatting objects. It should not be instantiated directly. + */ +public class InlineLevel extends FObjMixed { + protected CommonBorderPaddingBackground commonBorderPaddingBackground; + protected CommonAccessibility commonAccessibility; + protected CommonMarginInline commonMarginInline; + protected CommonAural commonAural; + protected CommonFont commonFont; + protected ColorType color; + protected Length lineHeight; + protected int visibility; + // End of property values + + /** + * @param parent FONode that is the parent of this object + */ + protected InlineLevel(FONode parent) { + super(parent); + } + + /** + * @see org.apache.fop.fo.FObj#bind(PropertyList) + */ + public void bind(PropertyList pList) throws FOPException { + commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps(); + commonAccessibility = pList.getAccessibilityProps(); + commonMarginInline = pList.getMarginInlineProps(); + commonAural = pList.getAuralProps(); + commonFont = pList.getFontProps(); + color = pList.get(PR_COLOR).getColorType(); + lineHeight = pList.get(PR_LINE_HEIGHT).getLength(); + visibility = pList.get(PR_VISIBILITY).getEnum(); + } + + /** + * Return the Common Margin Properties-Inline. + */ + public CommonMarginInline getCommonMarginInline() { + return commonMarginInline; + } + + /** + * Return the Common Border, Padding, and Background Properties. + */ + public CommonBorderPaddingBackground getCommonBorderPaddingBackground() { + return commonBorderPaddingBackground; + } + + /** + * Return the Common Font Properties. + */ + public CommonFont getCommonFont() { + return commonFont; + } + + /** + * Return the "color" property. + */ + public ColorType getColor() { + return color; + } + + /** + * @see org.apache.fop.fo.FONode#addLayoutManager(List) + */ + public void addLayoutManager(List list) { + if (getChildNodes() != null) { + InlineLayoutManager lm; + lm = new InlineLayoutManager(this); + list.add(lm); + } + } + +} + |