From: William Victor Mote Date: Tue, 12 Aug 2003 18:02:46 +0000 (+0000) Subject: move the "common" property classes from layout to fo.properties, renaming them with... X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1212 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b7838777ffd2c2297971728addef851ffc30509;p=xmlgraphics-fop.git move the "common" property classes from layout to fo.properties, renaming them with a "Common" prefix git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196790 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/InlineCharIterator.java b/src/java/org/apache/fop/fo/InlineCharIterator.java index a8db05075..55bcf499b 100644 --- a/src/java/org/apache/fop/fo/InlineCharIterator.java +++ b/src/java/org/apache/fop/fo/InlineCharIterator.java @@ -50,7 +50,7 @@ */ package org.apache.fop.fo; -import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.util.CharUtilities; import java.util.NoSuchElementException; @@ -64,13 +64,13 @@ public class InlineCharIterator extends RecursiveCharIterator { * descendant's character contents should be iterated * @param bap */ - public InlineCharIterator(FObj fobj, BorderAndPadding bap) { + public InlineCharIterator(FObj fobj, CommonBorderAndPadding bap) { super(fobj); checkBoundaries(bap); } - private void checkBoundaries(BorderAndPadding bap) { + private void checkBoundaries(CommonBorderAndPadding bap) { // TODO! use start and end in BAP!! bStartBoundary = (bap.getBorderLeftWidth(false) > 0 || bap.getPaddingLeft(false) > 0); diff --git a/src/java/org/apache/fop/fo/PropertyManager.java b/src/java/org/apache/fop/fo/PropertyManager.java index 32485de83..6dbbc85ef 100644 --- a/src/java/org/apache/fop/fo/PropertyManager.java +++ b/src/java/org/apache/fop/fo/PropertyManager.java @@ -59,14 +59,14 @@ import org.apache.fop.area.CTM; import org.apache.fop.datatypes.FODimension; import org.apache.fop.layout.FontState; import org.apache.fop.layout.FontInfo; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.MarginProps; -import org.apache.fop.layout.MarginInlineProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.RelativePositionProps; -import org.apache.fop.layout.AbsolutePositionProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.fo.properties.CommonMarginInline; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonRelativePosition; +import org.apache.fop.fo.properties.CommonAbsolutePosition; import org.apache.fop.traits.BlockProps; import org.apache.fop.traits.InlineProps; import org.apache.fop.traits.SpaceVal; @@ -75,7 +75,7 @@ import org.apache.fop.fo.properties.Constants; import org.apache.fop.fo.properties.WritingMode; import org.apache.fop.fo.properties.Span; import org.apache.fop.fonts.FontMetrics; -import org.apache.fop.layout.HyphenationProps; +import org.apache.fop.fo.properties.CommonHyphenation; /** * Helper class for managing groups of properties. @@ -85,8 +85,8 @@ public class PropertyManager { private PropertyList properties; private FontInfo fontInfo = null; private FontState fontState = null; - private BorderAndPadding borderAndPadding = null; - private HyphenationProps hyphProps = null; + private CommonBorderAndPadding borderAndPadding = null; + private CommonHyphenation hyphProps = null; private TextInfo textInfo = null; private static final String[] SA_BEFORE = new String[]{"before"}; @@ -181,14 +181,14 @@ public class PropertyManager { * reused. * @return a BorderAndPadding object */ - public BorderAndPadding getBorderAndPadding() { + public CommonBorderAndPadding getBorderAndPadding() { if (borderAndPadding == null) { - this.borderAndPadding = new BorderAndPadding(); + this.borderAndPadding = new CommonBorderAndPadding(); - initBorderInfo(BorderAndPadding.BEFORE, SA_BEFORE); - initBorderInfo(BorderAndPadding.AFTER, SA_AFTER); - initBorderInfo(BorderAndPadding.START, SA_START); - initBorderInfo(BorderAndPadding.END, SA_END); + initBorderInfo(CommonBorderAndPadding.BEFORE, SA_BEFORE); + initBorderInfo(CommonBorderAndPadding.AFTER, SA_AFTER); + initBorderInfo(CommonBorderAndPadding.START, SA_START); + initBorderInfo(CommonBorderAndPadding.END, SA_END); } return borderAndPadding; } @@ -213,9 +213,9 @@ public class PropertyManager { * reused. * @return a HyphenationProps object */ - public HyphenationProps getHyphenationProps() { + public CommonHyphenation getHyphenationProps() { if (hyphProps == null) { - this.hyphProps = new HyphenationProps(); + this.hyphProps = new CommonHyphenation(); hyphProps.hyphenate = this.properties.get("hyphenate").getEnum(); hyphProps.hyphenationChar = this.properties.get( @@ -305,8 +305,8 @@ public class PropertyManager { * reused. * @return a MarginProps object */ - public MarginProps getMarginProps() { - MarginProps props = new MarginProps(); + public CommonMarginBlock getMarginProps() { + CommonMarginBlock props = new CommonMarginBlock(); // Common Margin Properties-Block props.marginTop = @@ -336,8 +336,8 @@ public class PropertyManager { * reused. * @return a BackgroundProps object */ - public BackgroundProps getBackgroundProps() { - BackgroundProps bp = new BackgroundProps(); + public CommonBackground getBackgroundProps() { + CommonBackground bp = new CommonBackground(); bp.backAttachment = properties.get("background-attachment").getEnum(); bp.backColor = properties.get("background-color").getColorType(); if (bp.backColor.alpha() == 1) { @@ -367,8 +367,8 @@ public class PropertyManager { * reused. * @return a MarginInlineProps object */ - public MarginInlineProps getMarginInlineProps() { - MarginInlineProps props = new MarginInlineProps(); + public CommonMarginInline getMarginInlineProps() { + CommonMarginInline props = new CommonMarginInline(); return props; } @@ -389,8 +389,8 @@ public class PropertyManager { * reused. * @return a AccessibilityProps object */ - public AccessibilityProps getAccessibilityProps() { - AccessibilityProps props = new AccessibilityProps(); + public CommonAccessibility getAccessibilityProps() { + CommonAccessibility props = new CommonAccessibility(); String str; str = this.properties.get("source-document").getString(); if (!NONE.equals(str)) { @@ -408,8 +408,8 @@ public class PropertyManager { * reused. * @return a AuralProps object */ - public AuralProps getAuralProps() { - AuralProps props = new AuralProps(); + public CommonAural getAuralProps() { + CommonAural props = new CommonAural(); return props; } @@ -418,8 +418,8 @@ public class PropertyManager { * reused. * @return a RelativePositionProps object */ - public RelativePositionProps getRelativePositionProps() { - RelativePositionProps props = new RelativePositionProps(); + public CommonRelativePosition getRelativePositionProps() { + CommonRelativePosition props = new CommonRelativePosition(); return props; } @@ -428,8 +428,8 @@ public class PropertyManager { * it is reused. * @return a AbsolutePositionProps object */ - public AbsolutePositionProps getAbsolutePositionProps() { - AbsolutePositionProps props = new AbsolutePositionProps(); + public CommonAbsolutePosition getAbsolutePositionProps() { + CommonAbsolutePosition props = new CommonAbsolutePosition(); props.absolutePosition = this.properties.get("absolute-position").getEnum(); props.top = this.properties.get("top").getLength().getValue(); diff --git a/src/java/org/apache/fop/fo/flow/BasicLink.java b/src/java/org/apache/fop/fo/flow/BasicLink.java index 30724295b..3e75e3c6b 100644 --- a/src/java/org/apache/fop/fo/flow/BasicLink.java +++ b/src/java/org/apache/fop/fo/flow/BasicLink.java @@ -56,12 +56,12 @@ import java.io.Serializable; // FOP import org.apache.fop.fo.FONode; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.MarginInlineProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonMarginInline; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.area.inline.InlineParent; import org.apache.fop.area.Trait; import org.apache.fop.area.Resolveable; @@ -130,20 +130,20 @@ public class BasicLink extends Inline { int linkType; // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Margin Properties-Inline - MarginInlineProps mProps = propMgr.getMarginInlineProps(); + CommonMarginInline mProps = propMgr.getMarginInlineProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("alignment-adjust"); // this.properties.get("alignment-baseline"); diff --git a/src/java/org/apache/fop/fo/flow/BidiOverride.java b/src/java/org/apache/fop/fo/flow/BidiOverride.java index eba9384f9..886472cd9 100644 --- a/src/java/org/apache/fop/fo/flow/BidiOverride.java +++ b/src/java/org/apache/fop/fo/flow/BidiOverride.java @@ -53,8 +53,8 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObjMixed; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.LeafNodeLayoutManager; import org.apache.fop.layoutmgr.LayoutProcessor; @@ -100,13 +100,13 @@ public class BidiOverride extends FObjMixed { private void setup() { // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Font Properties //this.fontState = propMgr.getFontState(area.getFontInfo()); // Common Margin Properties-Inline - RelativePositionProps mProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mProps = propMgr.getRelativePositionProps(); // this.properties.get("color"); // this.properties.get("direction"); diff --git a/src/java/org/apache/fop/fo/flow/Block.java b/src/java/org/apache/fop/fo/flow/Block.java index 563398c90..ad7872dcb 100644 --- a/src/java/org/apache/fop/fo/flow/Block.java +++ b/src/java/org/apache/fop/fo/flow/Block.java @@ -66,13 +66,13 @@ import org.apache.fop.fo.FObjMixed; import org.apache.fop.fo.RecursiveCharIterator; import org.apache.fop.fo.TextInfo; import org.apache.fop.fo.properties.Constants; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.HyphenationProps; -import org.apache.fop.layout.MarginProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonHyphenation; +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.BlockLayoutManager; import org.apache.fop.util.CharUtilities; @@ -153,26 +153,26 @@ public class Block extends FObjMixed { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Font Properties //this.fontState = propMgr.getFontState(area.getFontInfo()); // Common Hyphenation Properties - HyphenationProps mHyphProps = propMgr.getHyphenationProps(); + CommonHyphenation mHyphProps = propMgr.getHyphenationProps(); // Common Margin Properties-Block - MarginProps mProps = propMgr.getMarginProps(); + CommonMarginBlock mProps = propMgr.getMarginProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("break-after"); diff --git a/src/java/org/apache/fop/fo/flow/BlockContainer.java b/src/java/org/apache/fop/fo/flow/BlockContainer.java index 55ed11e77..e67142f46 100644 --- a/src/java/org/apache/fop/fo/flow/BlockContainer.java +++ b/src/java/org/apache/fop/fo/flow/BlockContainer.java @@ -55,10 +55,10 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; -import org.apache.fop.layout.AbsolutePositionProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.MarginProps; +import org.apache.fop.fo.properties.CommonAbsolutePosition; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonMarginBlock; import org.apache.fop.layoutmgr.BlockContainerLayoutManager; import org.xml.sax.Attributes; @@ -113,14 +113,14 @@ public class BlockContainer extends FObj { private void setup() { // Common Accessibility Properties - AbsolutePositionProps mAbsProps = propMgr.getAbsolutePositionProps(); + CommonAbsolutePosition mAbsProps = propMgr.getAbsolutePositionProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Margin-Block Properties - MarginProps mProps = propMgr.getMarginProps(); + CommonMarginBlock mProps = propMgr.getMarginProps(); // this.properties.get("block-progression-dimension"); // this.properties.get("break-after"); diff --git a/src/java/org/apache/fop/fo/flow/Character.java b/src/java/org/apache/fop/fo/flow/Character.java index b8c589eaf..147c9823f 100644 --- a/src/java/org/apache/fop/fo/flow/Character.java +++ b/src/java/org/apache/fop/fo/flow/Character.java @@ -58,12 +58,12 @@ import org.apache.fop.fo.CharIterator; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.OneCharIterator; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.HyphenationProps; -import org.apache.fop.layout.MarginInlineProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonHyphenation; +import org.apache.fop.fo.properties.CommonMarginInline; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.apps.FOPException; import org.apache.fop.area.inline.InlineArea; import org.apache.fop.layoutmgr.LeafNodeLayoutManager; @@ -125,23 +125,23 @@ public class Character extends FObj { private void setup() throws FOPException { // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Font Properties //this.fontState = propMgr.getFontState(area.getFontInfo()); // Common Hyphenation Properties - HyphenationProps mHyphProps = propMgr.getHyphenationProps(); + CommonHyphenation mHyphProps = propMgr.getHyphenationProps(); // Common Margin Properties-Inline - MarginInlineProps mProps = propMgr.getMarginInlineProps(); + CommonMarginInline mProps = propMgr.getMarginInlineProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("alignment-adjust"); diff --git a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java index 86ea54c4d..699388e36 100644 --- a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java +++ b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java @@ -53,8 +53,8 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.TextAlign; import org.apache.fop.fo.properties.Overflow; import org.apache.fop.fo.properties.DisplayAlign; @@ -141,8 +141,8 @@ public class ExternalGraphic extends FObj { vp.setOffset(0); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); TraitSetter.addBorders(vp, bap); TraitSetter.addBackground(vp, bProps); diff --git a/src/java/org/apache/fop/fo/flow/InitialPropertySet.java b/src/java/org/apache/fop/fo/flow/InitialPropertySet.java index 6397e0bf3..2f44e2b5f 100644 --- a/src/java/org/apache/fop/fo/flow/InitialPropertySet.java +++ b/src/java/org/apache/fop/fo/flow/InitialPropertySet.java @@ -53,11 +53,11 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.ToBeImplementedElement; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonRelativePosition; /** * Class modelling the fo:initial-property-set object. See Sec. 6.6.4 of the @@ -75,20 +75,20 @@ public class InitialPropertySet extends ToBeImplementedElement { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Font Properties //this.fontState = propMgr.getFontState(area.getFontInfo()); // Common Relative Position Properties - RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("color"); setupID(); diff --git a/src/java/org/apache/fop/fo/flow/Inline.java b/src/java/org/apache/fop/fo/flow/Inline.java index 98fca8639..00f521d14 100644 --- a/src/java/org/apache/fop/fo/flow/Inline.java +++ b/src/java/org/apache/fop/fo/flow/Inline.java @@ -59,12 +59,12 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObjMixed; import org.apache.fop.fo.InlineCharIterator; import org.apache.fop.fo.properties.TextDecoration; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.MarginInlineProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonMarginInline; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.apps.FOPException; /** @@ -99,23 +99,23 @@ public class Inline extends FObjMixed { } // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Font Properties //this.fontState = propMgr.getFontState(area.getFontInfo()); // Common Margin Properties-Inline - MarginInlineProps mProps = propMgr.getMarginInlineProps(); + CommonMarginInline mProps = propMgr.getMarginInlineProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("alignment-adjust"); // this.properties.get("alignment-baseline"); diff --git a/src/java/org/apache/fop/fo/flow/InlineContainer.java b/src/java/org/apache/fop/fo/flow/InlineContainer.java index 9d6a48e57..a6938932f 100644 --- a/src/java/org/apache/fop/fo/flow/InlineContainer.java +++ b/src/java/org/apache/fop/fo/flow/InlineContainer.java @@ -61,10 +61,10 @@ import org.xml.sax.Attributes; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.apps.FOPException; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.MarginInlineProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonMarginInline; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.LayoutManager; import org.apache.fop.layoutmgr.LeafNodeLayoutManager; import org.apache.fop.area.inline.InlineArea; @@ -100,14 +100,14 @@ public class InlineContainer extends FObj { public void handleAttrs(Attributes attlist) throws FOPException { super.handleAttrs(attlist); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Margin Properties-Inline - MarginInlineProps mProps = propMgr.getMarginInlineProps(); + CommonMarginInline mProps = propMgr.getMarginInlineProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("alignment-adjust"); diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java index 596ef299e..ea3f9790c 100644 --- a/src/java/org/apache/fop/fo/flow/Leader.java +++ b/src/java/org/apache/fop/fo/flow/Leader.java @@ -66,14 +66,14 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObjMixed; import org.apache.fop.fo.FOInputHandler; import org.apache.fop.fo.properties.LeaderPattern; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.layout.FontInfo; import org.apache.fop.layout.FontState; -import org.apache.fop.layout.MarginInlineProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonMarginInline; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.ContentLayoutManager; import org.apache.fop.layoutmgr.InlineStackingLayoutManager; import org.apache.fop.layoutmgr.LMiter; @@ -223,23 +223,23 @@ public class Leader extends FObjMixed { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Font Properties this.fontState = propMgr.getFontState(fontInfo); // Common Margin Properties-Inline - MarginInlineProps mProps = propMgr.getMarginInlineProps(); + CommonMarginInline mProps = propMgr.getMarginInlineProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("alignment-adjust"); // this.properties.get("alignment-baseline"); diff --git a/src/java/org/apache/fop/fo/flow/ListBlock.java b/src/java/org/apache/fop/fo/flow/ListBlock.java index 6f7348e38..1f0bf77fb 100644 --- a/src/java/org/apache/fop/fo/flow/ListBlock.java +++ b/src/java/org/apache/fop/fo/flow/ListBlock.java @@ -58,12 +58,12 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.MarginProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.list.ListBlockLayoutManager; /** @@ -105,20 +105,20 @@ public class ListBlock extends FObj { private void setup() throws FOPException { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Margin Properties-Block - MarginProps mProps = propMgr.getMarginProps(); + CommonMarginBlock mProps = propMgr.getMarginProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("break-after"); // this.properties.get("break-before"); diff --git a/src/java/org/apache/fop/fo/flow/ListItem.java b/src/java/org/apache/fop/fo/flow/ListItem.java index 0624f3a84..2779fb178 100644 --- a/src/java/org/apache/fop/fo/flow/ListItem.java +++ b/src/java/org/apache/fop/fo/flow/ListItem.java @@ -56,12 +56,12 @@ import java.util.List; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.MarginProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.list.ListItemLayoutManager; /** @@ -109,20 +109,20 @@ public class ListItem extends FObj { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Margin Properties-Block - MarginProps mProps = propMgr.getMarginProps(); + CommonMarginBlock mProps = propMgr.getMarginProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("break-after"); // this.properties.get("break-before"); diff --git a/src/java/org/apache/fop/fo/flow/ListItemBody.java b/src/java/org/apache/fop/fo/flow/ListItemBody.java index e44a5e207..bd62a7e92 100644 --- a/src/java/org/apache/fop/fo/flow/ListItemBody.java +++ b/src/java/org/apache/fop/fo/flow/ListItemBody.java @@ -53,7 +53,7 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; -import org.apache.fop.layout.AccessibilityProps; +import org.apache.fop.fo.properties.CommonAccessibility; import org.apache.fop.layoutmgr.list.Item; /** @@ -82,7 +82,7 @@ public class ListItemBody extends FObj { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); setupID(); // this.properties.get("keep-together"); diff --git a/src/java/org/apache/fop/fo/flow/ListItemLabel.java b/src/java/org/apache/fop/fo/flow/ListItemLabel.java index b93ee29cc..9596f5055 100644 --- a/src/java/org/apache/fop/fo/flow/ListItemLabel.java +++ b/src/java/org/apache/fop/fo/flow/ListItemLabel.java @@ -53,7 +53,7 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; -import org.apache.fop.layout.AccessibilityProps; +import org.apache.fop.fo.properties.CommonAccessibility; import org.apache.fop.layoutmgr.list.Item; /** @@ -82,7 +82,7 @@ public class ListItemLabel extends FObj { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); setupID(); // this.properties.get("keep-together"); diff --git a/src/java/org/apache/fop/fo/flow/MultiCase.java b/src/java/org/apache/fop/fo/flow/MultiCase.java index 5d27798bf..f3151b0cc 100644 --- a/src/java/org/apache/fop/fo/flow/MultiCase.java +++ b/src/java/org/apache/fop/fo/flow/MultiCase.java @@ -53,7 +53,7 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.ToBeImplementedElement; -import org.apache.fop.layout.AccessibilityProps; +import org.apache.fop.fo.properties.CommonAccessibility; /** * Class modelling the fo:multi-case object. See Sec. 6.9.4 of the XSL-FO @@ -71,7 +71,7 @@ public class MultiCase extends ToBeImplementedElement { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); setupID(); // this.properties.get("starting-state"); diff --git a/src/java/org/apache/fop/fo/flow/MultiProperties.java b/src/java/org/apache/fop/fo/flow/MultiProperties.java index a8b317774..76e3fd959 100644 --- a/src/java/org/apache/fop/fo/flow/MultiProperties.java +++ b/src/java/org/apache/fop/fo/flow/MultiProperties.java @@ -53,7 +53,7 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.ToBeImplementedElement; -import org.apache.fop.layout.AccessibilityProps; +import org.apache.fop.fo.properties.CommonAccessibility; /** * Class modelling the fo:multi-properties object. See Sec. 6.9.6 of the XSL-FO @@ -71,7 +71,7 @@ public class MultiProperties extends ToBeImplementedElement { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); setupID(); diff --git a/src/java/org/apache/fop/fo/flow/MultiSwitch.java b/src/java/org/apache/fop/fo/flow/MultiSwitch.java index 5f096af24..5ae8cc335 100644 --- a/src/java/org/apache/fop/fo/flow/MultiSwitch.java +++ b/src/java/org/apache/fop/fo/flow/MultiSwitch.java @@ -53,7 +53,7 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.ToBeImplementedElement; -import org.apache.fop.layout.AccessibilityProps; +import org.apache.fop.fo.properties.CommonAccessibility; /** * Class modelling the fo:multi-switch object. See Sec. 6.9.3 of the XSL-FO @@ -71,7 +71,7 @@ public class MultiSwitch extends ToBeImplementedElement { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // this.properties.get("auto-restore"); setupID(); diff --git a/src/java/org/apache/fop/fo/flow/MultiToggle.java b/src/java/org/apache/fop/fo/flow/MultiToggle.java index a3fe45606..d088f6591 100644 --- a/src/java/org/apache/fop/fo/flow/MultiToggle.java +++ b/src/java/org/apache/fop/fo/flow/MultiToggle.java @@ -53,7 +53,7 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.ToBeImplementedElement; -import org.apache.fop.layout.AccessibilityProps; +import org.apache.fop.fo.properties.CommonAccessibility; /** * Class modelling the fo:multi-toggle property. See Sec. 6.9.5 of the XSL-FO @@ -71,7 +71,7 @@ public class MultiToggle extends ToBeImplementedElement { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); setupID(); // this.properties.get("switch-to"); diff --git a/src/java/org/apache/fop/fo/flow/PageNumber.java b/src/java/org/apache/fop/fo/flow/PageNumber.java index fd56c5f58..af8b3ea57 100644 --- a/src/java/org/apache/fop/fo/flow/PageNumber.java +++ b/src/java/org/apache/fop/fo/flow/PageNumber.java @@ -54,14 +54,14 @@ package org.apache.fop.fo.flow; import java.util.List; // FOP -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.layout.FontInfo; import org.apache.fop.layout.FontState; -import org.apache.fop.layout.MarginInlineProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonMarginInline; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layout.TextState; import org.apache.fop.util.CharUtilities; @@ -150,23 +150,23 @@ public class PageNumber extends FObj { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Font Properties this.fontState = propMgr.getFontState(fontInfo); // Common Margin Properties-Inline - MarginInlineProps mProps = propMgr.getMarginInlineProps(); + CommonMarginInline mProps = propMgr.getMarginInlineProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("alignment-adjust"); diff --git a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java index 04b3844a5..367fd3e51 100644 --- a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java +++ b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java @@ -64,14 +64,14 @@ import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.FOInputHandler; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.layout.FontInfo; import org.apache.fop.layout.FontState; -import org.apache.fop.layout.MarginInlineProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonMarginInline; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layout.TextState; import org.apache.fop.layoutmgr.LayoutContext; import org.apache.fop.layoutmgr.LayoutManager; @@ -205,23 +205,23 @@ public class PageNumberCitation extends FObj { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Font Properties this.fontState = propMgr.getFontState(fontInfo); // Common Margin Properties-Inline - MarginInlineProps mProps = propMgr.getMarginInlineProps(); + CommonMarginInline mProps = propMgr.getMarginInlineProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("alignment-adjust"); diff --git a/src/java/org/apache/fop/fo/flow/Table.java b/src/java/org/apache/fop/fo/flow/Table.java index bff2e4cd4..5e2797bac 100644 --- a/src/java/org/apache/fop/fo/flow/Table.java +++ b/src/java/org/apache/fop/fo/flow/Table.java @@ -62,12 +62,12 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.properties.TableLayout; import org.apache.fop.fo.properties.TableOmitFooterAtBreak; import org.apache.fop.fo.properties.TableOmitHeaderAtBreak; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.MarginProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.table.TableLayoutManager; /** @@ -148,20 +148,20 @@ public class Table extends FObj { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Margin Properties-Block - MarginProps mProps = propMgr.getMarginProps(); + CommonMarginBlock mProps = propMgr.getMarginProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("block-progression-dimension"); diff --git a/src/java/org/apache/fop/fo/flow/TableAndCaption.java b/src/java/org/apache/fop/fo/flow/TableAndCaption.java index 7e63898cd..eda3afa31 100644 --- a/src/java/org/apache/fop/fo/flow/TableAndCaption.java +++ b/src/java/org/apache/fop/fo/flow/TableAndCaption.java @@ -53,12 +53,12 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.ToBeImplementedElement; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.MarginProps; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.fo.properties.CommonRelativePosition; /** * Class modelling the fo:table-and-caption property. See Sec. 6.7.2 of the @@ -76,20 +76,20 @@ public class TableAndCaption extends ToBeImplementedElement { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Margin Properties-Block - MarginProps mProps = propMgr.getMarginProps(); + CommonMarginBlock mProps = propMgr.getMarginProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("caption-side"); setupID(); diff --git a/src/java/org/apache/fop/fo/flow/TableBody.java b/src/java/org/apache/fop/fo/flow/TableBody.java index 8825919ff..fc364cb8a 100644 --- a/src/java/org/apache/fop/fo/flow/TableBody.java +++ b/src/java/org/apache/fop/fo/flow/TableBody.java @@ -59,11 +59,11 @@ import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.table.Body; /** @@ -101,17 +101,17 @@ public class TableBody extends FObj { private void setup() throws FOPException { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); setupID(); diff --git a/src/java/org/apache/fop/fo/flow/TableCaption.java b/src/java/org/apache/fop/fo/flow/TableCaption.java index 8b0e58a45..8d4d00bcc 100644 --- a/src/java/org/apache/fop/fo/flow/TableCaption.java +++ b/src/java/org/apache/fop/fo/flow/TableCaption.java @@ -53,11 +53,11 @@ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.ToBeImplementedElement; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonRelativePosition; /** * Class modelling the fo:table-caption object. See Sec. 6.7.5 of the XSL-FO @@ -78,17 +78,17 @@ public class TableCaption extends ToBeImplementedElement { public void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("block-progression-dimension"); // this.properties.get("height"); diff --git a/src/java/org/apache/fop/fo/flow/TableCell.java b/src/java/org/apache/fop/fo/flow/TableCell.java index a2bf49969..aa15a9807 100644 --- a/src/java/org/apache/fop/fo/flow/TableCell.java +++ b/src/java/org/apache/fop/fo/flow/TableCell.java @@ -64,11 +64,11 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.properties.BorderCollapse; import org.apache.fop.fo.properties.DisplayAlign; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.table.Cell; /** @@ -214,17 +214,17 @@ public class TableCell extends FObj { private void doSetup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("border-after-precedence"); // this.properties.get("border-before-precendence"); @@ -285,7 +285,7 @@ public class TableCell extends FObj { * Calculate cell border and padding, including offset of content * rectangle from the theoretical grid position. */ - private void calcBorders(BorderAndPadding bp) { + private void calcBorders(CommonBorderAndPadding bp) { if (this.bSepBorders) { /* * Easy case. diff --git a/src/java/org/apache/fop/fo/flow/TableColumn.java b/src/java/org/apache/fop/fo/flow/TableColumn.java index 19b79c67e..3236912a5 100644 --- a/src/java/org/apache/fop/fo/flow/TableColumn.java +++ b/src/java/org/apache/fop/fo/flow/TableColumn.java @@ -57,8 +57,8 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.Property; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.layoutmgr.LayoutManager; import org.apache.fop.layoutmgr.table.Column; @@ -135,8 +135,8 @@ public class TableColumn extends FObj { // Common Border, Padding, and Background Properties // only background apply, border apply if border-collapse // is collapse. - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // this.properties.get("column-width"); // this.properties.get("number-columns-repeated"); diff --git a/src/java/org/apache/fop/fo/flow/TableRow.java b/src/java/org/apache/fop/fo/flow/TableRow.java index 80ef93bdf..42ee9c2e9 100644 --- a/src/java/org/apache/fop/fo/flow/TableRow.java +++ b/src/java/org/apache/fop/fo/flow/TableRow.java @@ -61,11 +61,11 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.Property; import org.apache.fop.fo.properties.Constants; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.table.Row; /** @@ -112,21 +112,21 @@ public class TableRow extends FObj { private void doSetup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // this.properties.get("block-progression-dimension"); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties // only background apply, border apply if border-collapse // is collapse. - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Relative Position Properties - RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); + CommonRelativePosition mRelProps = propMgr.getRelativePositionProps(); // this.properties.get("break-before"); // this.properties.get("break-after"); diff --git a/src/java/org/apache/fop/fo/pagination/Region.java b/src/java/org/apache/fop/fo/pagination/Region.java index 682595a47..766877183 100644 --- a/src/java/org/apache/fop/fo/pagination/Region.java +++ b/src/java/org/apache/fop/fo/pagination/Region.java @@ -58,8 +58,8 @@ import java.awt.geom.Rectangle2D; import org.apache.fop.datatypes.FODimension; import org.apache.fop.fo.FObj; import org.apache.fop.fo.FONode; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.apps.FOPException; import org.apache.fop.area.CTM; import org.apache.fop.area.RegionViewport; @@ -159,8 +159,8 @@ public abstract class Region extends FObj { */ protected void setRegionViewportTraits(RegionViewport r) { // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); TraitSetter.addBorders(r, bap); TraitSetter.addBackground(r, bProps); diff --git a/src/java/org/apache/fop/fo/pagination/RegionBody.java b/src/java/org/apache/fop/fo/pagination/RegionBody.java index e7b278c30..f3c65ceb6 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionBody.java +++ b/src/java/org/apache/fop/fo/pagination/RegionBody.java @@ -65,7 +65,7 @@ import org.apache.fop.datatypes.ColorType; import org.apache.fop.datatypes.FODimension; import org.apache.fop.area.RegionReference; import org.apache.fop.area.BodyRegion; -import org.apache.fop.layout.MarginProps; +import org.apache.fop.fo.properties.CommonMarginBlock; /** * The fo:region-body element. @@ -92,7 +92,7 @@ public class RegionBody extends Region { * writing-mode on the page (not on the region-body!). If that's not * set but indent is explicitly set, it will return that. */ - MarginProps mProps = propMgr.getMarginProps(); + CommonMarginBlock mProps = propMgr.getMarginProps(); int start = getRelMargin(PropertyList.START, "start-indent"); Rectangle vpRect; if (this.wm == WritingMode.LR_TB || this.wm == WritingMode.RL_TB) { diff --git a/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java b/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java index 3353fe1f8..6b3c52097 100644 --- a/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java +++ b/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java @@ -68,7 +68,7 @@ import org.apache.fop.area.PageViewport; import org.apache.fop.area.Page; import org.apache.fop.area.RegionViewport; import org.apache.fop.area.RegionReference; -import org.apache.fop.layout.MarginProps; +import org.apache.fop.fo.properties.CommonMarginBlock; import org.apache.fop.layout.PageMaster; import org.apache.fop.apps.FOPException; @@ -130,7 +130,7 @@ public class SimplePageMaster extends FObj { // this.properties.get("writing-mode"); // Get absolute margin properties (top, left, bottom, right) - MarginProps mProps = propMgr.getMarginProps(); + CommonMarginBlock mProps = propMgr.getMarginProps(); /* Create the page reference area rectangle (0,0 is at top left * of the "page media" and y increases diff --git a/src/java/org/apache/fop/fo/pagination/Title.java b/src/java/org/apache/fop/fo/pagination/Title.java index 85c39b993..a1b9c9d98 100644 --- a/src/java/org/apache/fop/fo/pagination/Title.java +++ b/src/java/org/apache/fop/fo/pagination/Title.java @@ -58,12 +58,12 @@ import org.apache.fop.fo.FObjMixed; import org.apache.fop.fo.FONode; import org.apache.fop.fo.LengthProperty; import org.apache.fop.fo.Property; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.fo.properties.CommonAccessibility; +import org.apache.fop.fo.properties.CommonAural; +import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.layout.FontState; -import org.apache.fop.layout.MarginInlineProps; +import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.layoutmgr.ContentLayoutManager; import org.apache.fop.layoutmgr.InlineStackingLayoutManager; import org.apache.fop.layoutmgr.LMiter; @@ -110,20 +110,20 @@ public class Title extends FObjMixed { private void setup() { // Common Accessibility Properties - AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); + CommonAccessibility mAccProps = propMgr.getAccessibilityProps(); // Common Aural Properties - AuralProps mAurProps = propMgr.getAuralProps(); + CommonAural mAurProps = propMgr.getAuralProps(); // Common Border, Padding, and Background Properties - BorderAndPadding bap = propMgr.getBorderAndPadding(); - BackgroundProps bProps = propMgr.getBackgroundProps(); + CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); + CommonBackground bProps = propMgr.getBackgroundProps(); // Common Font Properties FontState fontState = propMgr.getFontState(foInputHandler.getFontInfo()); // Common Margin Properties-Inline - MarginInlineProps mProps = propMgr.getMarginInlineProps(); + CommonMarginInline mProps = propMgr.getMarginInlineProps(); Property prop; prop = this.properties.get("baseline-shift"); diff --git a/src/java/org/apache/fop/fo/properties/CommonAbsolutePosition.java b/src/java/org/apache/fop/fo/properties/CommonAbsolutePosition.java new file mode 100644 index 000000000..4b7c229a5 --- /dev/null +++ b/src/java/org/apache/fop/fo/properties/CommonAbsolutePosition.java @@ -0,0 +1,68 @@ +/* + * $Id$ + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * ============================================================================ + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + */ +package org.apache.fop.fo.properties; + +/** + * Store all common absolute position properties. + * See Sec. 7.5 of the XSL-FO Standard. + * Public "structure" allows direct member access. + */ +public class CommonAbsolutePosition { + public int absolutePosition; + public int top; + public int right; + public int bottom; + public int left; + + public CommonAbsolutePosition() { + } + +} diff --git a/src/java/org/apache/fop/fo/properties/CommonAccessibility.java b/src/java/org/apache/fop/fo/properties/CommonAccessibility.java new file mode 100644 index 000000000..d8b0c9f67 --- /dev/null +++ b/src/java/org/apache/fop/fo/properties/CommonAccessibility.java @@ -0,0 +1,65 @@ +/* + * $Id$ + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * ============================================================================ + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + */ +package org.apache.fop.fo.properties; + +/** + * Store all common accessibility properties. + * See Sec 7.4 of the XSL-FO Standard. + * Public "structure" allows direct member access. + */ +public class CommonAccessibility { + public String sourceDoc = null; + public String role = null; + + public CommonAccessibility() { + } + +} diff --git a/src/java/org/apache/fop/fo/properties/CommonAural.java b/src/java/org/apache/fop/fo/properties/CommonAural.java new file mode 100644 index 000000000..d53d923f8 --- /dev/null +++ b/src/java/org/apache/fop/fo/properties/CommonAural.java @@ -0,0 +1,79 @@ +/* + * $Id$ + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * ============================================================================ + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + */ +package org.apache.fop.fo.properties; + +/** + * Stores all common aural properties. + * See Sec. 7.6 of the XSL-FO Standard. + * Public "structure" allows direct member access. + */ +public class CommonAural { + + public int azimuth; + public String cueAfter; + public String cueBefore; + public int elevation; + public int pauseAfter; + public int pauseBefore; + public int pitch; + public int pitchRange; + public int playDuring; + public int richness; + public int speak; + public int speakHeader; + public int speakNumeral; + public int speakPunctuation; + public int speechRate; + public int stress; + public int voiceFamily; + public int volume; + +} diff --git a/src/java/org/apache/fop/fo/properties/CommonBackground.java b/src/java/org/apache/fop/fo/properties/CommonBackground.java new file mode 100644 index 000000000..eb9db19bf --- /dev/null +++ b/src/java/org/apache/fop/fo/properties/CommonBackground.java @@ -0,0 +1,70 @@ +/* + * $Id$ + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * ============================================================================ + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + */ +package org.apache.fop.fo.properties; + +import org.apache.fop.datatypes.Length; +import org.apache.fop.datatypes.ColorType; + +/** + * Store all common background properties. + * See Sec 7.7 of the XSL-FO Standard. + * Public "structure" allows direct member access. + */ +public class CommonBackground { + + public int backAttachment; + public ColorType backColor; + public String backImage; + public int backRepeat; + public Length backPosHorizontal; + public Length backPosVertical; + +} diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java b/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java new file mode 100644 index 000000000..1da21d5b5 --- /dev/null +++ b/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java @@ -0,0 +1,213 @@ +/* + * $Id$ + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * ============================================================================ + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + */ +package org.apache.fop.fo.properties; + +import org.apache.fop.datatypes.ColorType; +import org.apache.fop.datatypes.CondLength; + +/** + * Stores all common border and padding properties. + * See Sec. 7.7 of the XSL-FO Standard. + */ +public class CommonBorderAndPadding implements Cloneable { + + public static final int BEFORE = 0; + public static final int AFTER = 1; + public static final int START = 2; + public static final int END = 3; + + public static final int TOP = BEFORE; + public static final int BOTTOM = AFTER; + public static final int LEFT = START; + public static final int RIGHT = END; + + private static class ResolvedCondLength implements Cloneable { + private int iLength; // Resolved length value + private boolean bDiscard; + + public ResolvedCondLength(CondLength length) { + bDiscard = length.isDiscard(); + iLength = length.getLengthValue(); + } + + public Object clone() throws CloneNotSupportedException { + return super.clone(); + } + + } + + /** + * Return a full copy of the BorderAndPadding information. This clones all + * padding and border information. + * @see java.lang.Object#clone() + */ + public Object clone() throws CloneNotSupportedException { + CommonBorderAndPadding bp = (CommonBorderAndPadding) super.clone(); + bp.padding = (ResolvedCondLength[]) padding.clone(); + bp.borderInfo = (BorderInfo[]) borderInfo.clone(); + for (int i = 0; i < padding.length; i++) { + if (padding[i] != null) { + bp.padding[i] = (ResolvedCondLength) padding[i].clone(); + } + if (borderInfo[i] != null) { + bp.borderInfo[i] = (BorderInfo) borderInfo[i].clone(); + } + } + return bp; + } + + public static class BorderInfo implements Cloneable { + private int mStyle; // Enum for border style + private ColorType mColor; // Border color + private ResolvedCondLength mWidth; + + BorderInfo(int style, CondLength width, ColorType color) { + mStyle = style; + mWidth = new ResolvedCondLength(width); + mColor = color; + } + + public Object clone() throws CloneNotSupportedException { + BorderInfo bi = (BorderInfo) super.clone(); + bi.mWidth = (ResolvedCondLength) mWidth.clone(); + // do we need to clone the Color too??? + return bi; + } + } + + private BorderInfo[] borderInfo = new BorderInfo[4]; + private ResolvedCondLength[] padding = new ResolvedCondLength[4]; + + public void setBorder(int side, int style, CondLength width, + ColorType color) { + borderInfo[side] = new BorderInfo(style, width, color); + } + + public void setPadding(int side, CondLength width) { + padding[side] = new ResolvedCondLength(width); + } + + public void setPaddingLength(int side, int iLength) { + padding[side].iLength = iLength; + } + + public void setBorderLength(int side, int iLength) { + borderInfo[side].mWidth.iLength = iLength; + } + + public int getBorderLeftWidth(boolean bDiscard) { + return getBorderWidth(LEFT, bDiscard); + } + + public int getBorderRightWidth(boolean bDiscard) { + return getBorderWidth(RIGHT, bDiscard); + } + + public int getBorderTopWidth(boolean bDiscard) { + return getBorderWidth(TOP, bDiscard); + } + + public int getBorderBottomWidth(boolean bDiscard) { + return getBorderWidth(BOTTOM, bDiscard); + } + + public int getPaddingLeft(boolean bDiscard) { + return getPadding(LEFT, bDiscard); + } + + public int getPaddingRight(boolean bDiscard) { + return getPadding(RIGHT, bDiscard); + } + + public int getPaddingBottom(boolean bDiscard) { + return getPadding(BOTTOM, bDiscard); + } + + public int getPaddingTop(boolean bDiscard) { + return getPadding(TOP, bDiscard); + } + + + public int getBorderWidth(int side, boolean bDiscard) { + if ((borderInfo[side] == null) + || (borderInfo[side].mStyle == Constants.NONE) + || (bDiscard && borderInfo[side].mWidth.bDiscard)) { + return 0; + } else { + return borderInfo[side].mWidth.iLength; + } + } + + public ColorType getBorderColor(int side) { + if (borderInfo[side] != null) { + return borderInfo[side].mColor; + } else { + return null; + } + } + + public int getBorderStyle(int side) { + if (borderInfo[side] != null) { + return borderInfo[side].mStyle; + } else { + return 0; + } + } + + public int getPadding(int side, boolean bDiscard) { + if ((padding[side] == null) || (bDiscard && padding[side].bDiscard)) { + return 0; + } else { + return padding[side].iLength; + } + } + +} diff --git a/src/java/org/apache/fop/fo/properties/CommonHyphenation.java b/src/java/org/apache/fop/fo/properties/CommonHyphenation.java new file mode 100644 index 000000000..517489dc4 --- /dev/null +++ b/src/java/org/apache/fop/fo/properties/CommonHyphenation.java @@ -0,0 +1,67 @@ +/* + * $Id$ + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * ============================================================================ + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + */ +package org.apache.fop.fo.properties; + +/** + * Store all common hyphenation properties. + * See Sec. 7.9 of the XSL-FO Standard. + * Public "structure" allows direct member access. + */ +public class CommonHyphenation { + + public int hyphenate; // Enum true or false: store as boolean! + public char hyphenationChar; + public int hyphenationPushCharacterCount; + public int hyphenationRemainCharacterCount; + public String language; // Language code or enum "NONE" + public String country; // Country code or enum "NONE" + +} diff --git a/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java b/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java new file mode 100644 index 000000000..e3217bf3b --- /dev/null +++ b/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java @@ -0,0 +1,69 @@ +/* + * $Id$ + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * ============================================================================ + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + */ +package org.apache.fop.fo.properties; + +/** + * Store all common margin properties for blocks. + * See Sec. 7.10 of the XSL-FO Standard. + * Public "structure" allows direct member access. + */ +public class CommonMarginBlock { + + public int marginTop; + public int marginBottom; + public int marginLeft; + public int marginRight; + public int spaceBefore; + public int spaceAfter; + public int startIndent; + public int endIndent; + +} diff --git a/src/java/org/apache/fop/fo/properties/CommonMarginInline.java b/src/java/org/apache/fop/fo/properties/CommonMarginInline.java new file mode 100644 index 000000000..634838212 --- /dev/null +++ b/src/java/org/apache/fop/fo/properties/CommonMarginInline.java @@ -0,0 +1,67 @@ +/* + * $Id$ + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * ============================================================================ + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + */ +package org.apache.fop.fo.properties; + +/** + * Store all common margin properties for inlines. + * See Sec. 7.11 of the XSL-FO Standard. + * Public "structure" allows direct member access. + */ +public class CommonMarginInline { + + public int marginTop; + public int marginBottom; + public int marginLeft; + public int marginRight; + public int spaceStart; + public int spaceEnd; + +} diff --git a/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java b/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java new file mode 100644 index 000000000..b92e6b6dd --- /dev/null +++ b/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java @@ -0,0 +1,69 @@ +/* + * $Id$ + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * ============================================================================ + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + */ +package org.apache.fop.fo.properties; + +/** + * Store all common relative position properties. + * See Sec 7.12 of the XSL-FO Standard. + * Public "structure" allows direct member access. + */ +public class CommonRelativePosition { + + public int marginTop; + public int marginBottom; + public int marginLeft; + public int marginRight; + public int spaceBefore; + public int spaceAfter; + public int startIndent; + public int endIndent; + +} diff --git a/src/java/org/apache/fop/layout/AbsolutePositionProps.java b/src/java/org/apache/fop/layout/AbsolutePositionProps.java deleted file mode 100644 index 9e70580fb..000000000 --- a/src/java/org/apache/fop/layout/AbsolutePositionProps.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * $Id: AbsolutePositionProps.java,v 1.4 2003/03/06 22:19:15 jeremias Exp $ - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ============================================================================ - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - */ -package org.apache.fop.layout; - -/** - * Store all hyphenation related properties on an FO. - * Public "structure" allows direct member access. - */ -public class AbsolutePositionProps { - public int absolutePosition; - public int top; - public int right; - public int bottom; - public int left; - - public AbsolutePositionProps() { - } - -} diff --git a/src/java/org/apache/fop/layout/AccessibilityProps.java b/src/java/org/apache/fop/layout/AccessibilityProps.java deleted file mode 100644 index d13fe5d7f..000000000 --- a/src/java/org/apache/fop/layout/AccessibilityProps.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * $Id: AccessibilityProps.java,v 1.2 2003/03/06 22:19:16 jeremias Exp $ - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ============================================================================ - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - */ -package org.apache.fop.layout; - -/** - * Store all hyphenation related properties on an FO. - * Public "structure" allows direct member access. - */ -public class AccessibilityProps { - public String sourceDoc = null; - public String role = null; - - public AccessibilityProps() { - } - -} diff --git a/src/java/org/apache/fop/layout/AuralProps.java b/src/java/org/apache/fop/layout/AuralProps.java deleted file mode 100644 index 65108fa5f..000000000 --- a/src/java/org/apache/fop/layout/AuralProps.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * $Id: AuralProps.java,v 1.2 2003/03/06 22:19:15 jeremias Exp $ - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ============================================================================ - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - */ -package org.apache.fop.layout; - -/** - * Store all hyphenation related properties on an FO. - * Public "structure" allows direct member access. - */ -public class AuralProps { - - public int azimuth; - public String cueAfter; - public String cueBefore; - public int elevation; - public int pauseAfter; - public int pauseBefore; - public int pitch; - public int pitchRange; - public int playDuring; - public int richness; - public int speak; - public int speakHeader; - public int speakNumeral; - public int speakPunctuation; - public int speechRate; - public int stress; - public int voiceFamily; - public int volume; - -} diff --git a/src/java/org/apache/fop/layout/BackgroundProps.java b/src/java/org/apache/fop/layout/BackgroundProps.java deleted file mode 100644 index 6f41951a6..000000000 --- a/src/java/org/apache/fop/layout/BackgroundProps.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * $Id: BackgroundProps.java,v 1.5 2003/03/06 22:19:16 jeremias Exp $ - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ============================================================================ - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - */ -package org.apache.fop.layout; - -import org.apache.fop.datatypes.Length; -import org.apache.fop.datatypes.ColorType; - -/** - * Store all background related properties on an FO. - * Public "structure" allows direct member access. - */ -public class BackgroundProps { - - public int backAttachment; - public ColorType backColor; - public String backImage; - public int backRepeat; - public Length backPosHorizontal; - public Length backPosVertical; - -} diff --git a/src/java/org/apache/fop/layout/BorderAndPadding.java b/src/java/org/apache/fop/layout/BorderAndPadding.java deleted file mode 100644 index f6ecd03ff..000000000 --- a/src/java/org/apache/fop/layout/BorderAndPadding.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * $Id: BorderAndPadding.java,v 1.10 2003/03/06 22:19:15 jeremias Exp $ - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ============================================================================ - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - */ -package org.apache.fop.layout; - -import org.apache.fop.datatypes.ColorType; -import org.apache.fop.datatypes.CondLength; -import org.apache.fop.fo.properties.Constants; - -public class BorderAndPadding implements Cloneable { - - public static final int BEFORE = 0; - public static final int AFTER = 1; - public static final int START = 2; - public static final int END = 3; - - public static final int TOP = BEFORE; - public static final int BOTTOM = AFTER; - public static final int LEFT = START; - public static final int RIGHT = END; - - private static class ResolvedCondLength implements Cloneable { - private int iLength; // Resolved length value - private boolean bDiscard; - - public ResolvedCondLength(CondLength length) { - bDiscard = length.isDiscard(); - iLength = length.getLengthValue(); - } - - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - } - - /** - * Return a full copy of the BorderAndPadding information. This clones all - * padding and border information. - * @see java.lang.Object#clone() - */ - public Object clone() throws CloneNotSupportedException { - BorderAndPadding bp = (BorderAndPadding) super.clone(); - bp.padding = (ResolvedCondLength[]) padding.clone(); - bp.borderInfo = (BorderInfo[]) borderInfo.clone(); - for (int i = 0; i < padding.length; i++) { - if (padding[i] != null) { - bp.padding[i] = (ResolvedCondLength) padding[i].clone(); - } - if (borderInfo[i] != null) { - bp.borderInfo[i] = (BorderInfo) borderInfo[i].clone(); - } - } - return bp; - } - - public static class BorderInfo implements Cloneable { - private int mStyle; // Enum for border style - private ColorType mColor; // Border color - private ResolvedCondLength mWidth; - - BorderInfo(int style, CondLength width, ColorType color) { - mStyle = style; - mWidth = new ResolvedCondLength(width); - mColor = color; - } - - public Object clone() throws CloneNotSupportedException { - BorderInfo bi = (BorderInfo) super.clone(); - bi.mWidth = (ResolvedCondLength) mWidth.clone(); - // do we need to clone the Color too??? - return bi; - } - } - - private BorderInfo[] borderInfo = new BorderInfo[4]; - private ResolvedCondLength[] padding = new ResolvedCondLength[4]; - - public void setBorder(int side, int style, CondLength width, - ColorType color) { - borderInfo[side] = new BorderInfo(style, width, color); - } - - public void setPadding(int side, CondLength width) { - padding[side] = new ResolvedCondLength(width); - } - - public void setPaddingLength(int side, int iLength) { - padding[side].iLength = iLength; - } - - public void setBorderLength(int side, int iLength) { - borderInfo[side].mWidth.iLength = iLength; - } - - public int getBorderLeftWidth(boolean bDiscard) { - return getBorderWidth(LEFT, bDiscard); - } - - public int getBorderRightWidth(boolean bDiscard) { - return getBorderWidth(RIGHT, bDiscard); - } - - public int getBorderTopWidth(boolean bDiscard) { - return getBorderWidth(TOP, bDiscard); - } - - public int getBorderBottomWidth(boolean bDiscard) { - return getBorderWidth(BOTTOM, bDiscard); - } - - public int getPaddingLeft(boolean bDiscard) { - return getPadding(LEFT, bDiscard); - } - - public int getPaddingRight(boolean bDiscard) { - return getPadding(RIGHT, bDiscard); - } - - public int getPaddingBottom(boolean bDiscard) { - return getPadding(BOTTOM, bDiscard); - } - - public int getPaddingTop(boolean bDiscard) { - return getPadding(TOP, bDiscard); - } - - - public int getBorderWidth(int side, boolean bDiscard) { - if ((borderInfo[side] == null) - || (borderInfo[side].mStyle == Constants.NONE) - || (bDiscard && borderInfo[side].mWidth.bDiscard)) { - return 0; - } else { - return borderInfo[side].mWidth.iLength; - } - } - - public ColorType getBorderColor(int side) { - if (borderInfo[side] != null) { - return borderInfo[side].mColor; - } else { - return null; - } - } - - public int getBorderStyle(int side) { - if (borderInfo[side] != null) { - return borderInfo[side].mStyle; - } else { - return 0; - } - } - - public int getPadding(int side, boolean bDiscard) { - if ((padding[side] == null) || (bDiscard && padding[side].bDiscard)) { - return 0; - } else { - return padding[side].iLength; - } - } - -} diff --git a/src/java/org/apache/fop/layout/HyphenationProps.java b/src/java/org/apache/fop/layout/HyphenationProps.java deleted file mode 100644 index 4f4fde8e7..000000000 --- a/src/java/org/apache/fop/layout/HyphenationProps.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * $Id: HyphenationProps.java,v 1.4 2003/03/06 22:19:16 jeremias Exp $ - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ============================================================================ - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - */ -package org.apache.fop.layout; - -/** - * Store all hyphenation related properties on an FO. - * Public "structure" allows direct member access. - */ -public class HyphenationProps { - - public int hyphenate; // Enum true or false: store as boolean! - public char hyphenationChar; - public int hyphenationPushCharacterCount; - public int hyphenationRemainCharacterCount; - public String language; // Language code or enum "NONE" - public String country; // Country code or enum "NONE" - -} diff --git a/src/java/org/apache/fop/layout/MarginInlineProps.java b/src/java/org/apache/fop/layout/MarginInlineProps.java deleted file mode 100644 index 139b28b91..000000000 --- a/src/java/org/apache/fop/layout/MarginInlineProps.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * $Id: MarginInlineProps.java,v 1.3 2003/03/06 22:19:16 jeremias Exp $ - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ============================================================================ - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - */ -package org.apache.fop.layout; - -/** - * Store all inline "margin" related properties - * Public "structure" allows direct member access. - */ -public class MarginInlineProps { - - public int marginTop; - public int marginBottom; - public int marginLeft; - public int marginRight; - public int spaceStart; - public int spaceEnd; - -} diff --git a/src/java/org/apache/fop/layout/MarginProps.java b/src/java/org/apache/fop/layout/MarginProps.java deleted file mode 100644 index 6435eb259..000000000 --- a/src/java/org/apache/fop/layout/MarginProps.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $Id: MarginProps.java,v 1.4 2003/03/06 22:19:16 jeremias Exp $ - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ============================================================================ - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - */ -package org.apache.fop.layout; - -/** - * Store all block-level margin related properties on an FO. - * Public "structure" allows direct member access. - */ -public class MarginProps { - - public int marginTop; - public int marginBottom; - public int marginLeft; - public int marginRight; - public int spaceBefore; - public int spaceAfter; - public int startIndent; - public int endIndent; - -} diff --git a/src/java/org/apache/fop/layout/RelativePositionProps.java b/src/java/org/apache/fop/layout/RelativePositionProps.java deleted file mode 100644 index 9ad73da3b..000000000 --- a/src/java/org/apache/fop/layout/RelativePositionProps.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $Id: RelativePositionProps.java,v 1.2 2003/03/06 22:19:15 jeremias Exp $ - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ============================================================================ - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - */ -package org.apache.fop.layout; - -/** - * Store all hyphenation related properties on an FO. - * Public "structure" allows direct member access. - */ -public class RelativePositionProps { - - public int marginTop; - public int marginBottom; - public int marginLeft; - public int marginRight; - public int spaceBefore; - public int spaceAfter; - public int startIndent; - public int endIndent; - -} diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java index 116ebf56f..fec324cd8 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java @@ -57,7 +57,7 @@ import org.apache.fop.area.Area; import org.apache.fop.area.BlockViewport; import org.apache.fop.area.Block; import org.apache.fop.fo.PropertyManager; -import org.apache.fop.layout.AbsolutePositionProps; +import org.apache.fop.fo.properties.CommonAbsolutePosition; import org.apache.fop.fo.properties.AbsolutePosition; import org.apache.fop.fo.properties.Overflow; import org.apache.fop.fo.PropertyList; @@ -74,7 +74,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager { private List childBreaks = new java.util.ArrayList(); - private AbsolutePositionProps abProps; + private CommonAbsolutePosition abProps; private FODimension relDims; private CTM absoluteCTM; private boolean clip = false; diff --git a/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java index 16df9728a..83262ec21 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java @@ -61,8 +61,8 @@ import org.apache.fop.area.Area; import org.apache.fop.area.Block; import org.apache.fop.area.LineArea; import org.apache.fop.traits.LayoutProps; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; /** * LayoutManager for a block FO. @@ -72,8 +72,8 @@ public class BlockLayoutManager extends BlockStackingLayoutManager { private Block curBlockArea; private LayoutProps layoutProps; - private BorderAndPadding borderProps; - private BackgroundProps backgroundProps; + private CommonBorderAndPadding borderProps; + private CommonBackground backgroundProps; private int lead = 12000; private int lineHeight = 14000; diff --git a/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java b/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java index 6b59e92ee..b5c9cd162 100644 --- a/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java @@ -56,8 +56,8 @@ import java.util.HashMap; import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyManager; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.traits.InlineProps; import org.apache.fop.area.Area; import org.apache.fop.area.inline.InlineArea; @@ -100,8 +100,8 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager { private InlineProps inlineProps = null; - private BorderAndPadding borderProps = null; - private BackgroundProps backgroundProps; + private CommonBorderAndPadding borderProps = null; + private CommonBackground backgroundProps; private Area currentArea; // LineArea or InlineParent @@ -165,38 +165,38 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager { inlineProps = propMgr.getInlineProps(); borderProps = propMgr.getBorderAndPadding(); // Calculdate border and padding size in BPD - int iPad = borderProps.getPadding(BorderAndPadding.BEFORE, false); - iPad += borderProps.getBorderWidth(BorderAndPadding.BEFORE, + int iPad = borderProps.getPadding(CommonBorderAndPadding.BEFORE, false); + iPad += borderProps.getBorderWidth(CommonBorderAndPadding.BEFORE, false); - iPad += borderProps.getPadding(BorderAndPadding.AFTER, false); - iPad += borderProps.getBorderWidth(BorderAndPadding.AFTER, false); + iPad += borderProps.getPadding(CommonBorderAndPadding.AFTER, false); + iPad += borderProps.getBorderWidth(CommonBorderAndPadding.AFTER, false); extraBPD = new MinOptMax(iPad); backgroundProps = propMgr.getBackgroundProps(); } private MinOptMax getExtraIPD(boolean bNotFirst, boolean bNotLast) { - int iBP = borderProps.getPadding(BorderAndPadding.START, + int iBP = borderProps.getPadding(CommonBorderAndPadding.START, bNotFirst); - iBP += borderProps.getBorderWidth(BorderAndPadding.START, + iBP += borderProps.getBorderWidth(CommonBorderAndPadding.START, bNotFirst); - iBP += borderProps.getPadding(BorderAndPadding.END, bNotLast); - iBP += borderProps.getBorderWidth(BorderAndPadding.END, bNotLast); + iBP += borderProps.getPadding(CommonBorderAndPadding.END, bNotLast); + iBP += borderProps.getBorderWidth(CommonBorderAndPadding.END, bNotLast); return new MinOptMax(iBP); } protected boolean hasLeadingFence(boolean bNotFirst) { - int iBP = borderProps.getPadding(BorderAndPadding.START, + int iBP = borderProps.getPadding(CommonBorderAndPadding.START, bNotFirst); - iBP += borderProps.getBorderWidth(BorderAndPadding.START, + iBP += borderProps.getBorderWidth(CommonBorderAndPadding.START, bNotFirst); return (iBP > 0); } protected boolean hasTrailingFence(boolean bNotLast) { - int iBP = borderProps.getPadding(BorderAndPadding.END, bNotLast); - iBP += borderProps.getBorderWidth(BorderAndPadding.END, bNotLast); + int iBP = borderProps.getPadding(CommonBorderAndPadding.END, bNotLast); + iBP += borderProps.getBorderWidth(CommonBorderAndPadding.END, bNotLast); return (iBP > 0); } diff --git a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java index 9d9a02e9c..39dcb25c4 100644 --- a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java @@ -51,8 +51,8 @@ package org.apache.fop.layoutmgr; import org.apache.fop.fo.PropertyManager; -import org.apache.fop.layout.MarginProps; -import org.apache.fop.layout.HyphenationProps; +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.fo.properties.CommonHyphenation; import org.apache.fop.layout.hyphenation.Hyphenation; import org.apache.fop.layout.hyphenation.Hyphenator; import org.apache.fop.traits.BlockProps; @@ -111,7 +111,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager { private int bTextAlignment = TextAlign.JUSTIFY; private int iTextIndent = 0; private int iIndents = 0; - private HyphenationProps hyphProps; + private CommonHyphenation hyphProps; private int lineHeight; private int lead; @@ -142,7 +142,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager { * @see org.apache.fop.layoutmgr.AbstractLayoutManager#initProperties(PropertyManager) */ protected void initProperties(PropertyManager propMgr) { - MarginProps marginProps = propMgr.getMarginProps(); + CommonMarginBlock marginProps = propMgr.getMarginProps(); iIndents = marginProps.startIndent + marginProps.endIndent; BlockProps blockProps = propMgr.getBlockProps(); bTextAlignment = blockProps.textAlign; diff --git a/src/java/org/apache/fop/layoutmgr/TraitSetter.java b/src/java/org/apache/fop/layoutmgr/TraitSetter.java index 973684144..017a7258c 100644 --- a/src/java/org/apache/fop/layoutmgr/TraitSetter.java +++ b/src/java/org/apache/fop/layoutmgr/TraitSetter.java @@ -50,11 +50,11 @@ */ package org.apache.fop.layoutmgr; -import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.traits.BorderProps; import org.apache.fop.area.Area; import org.apache.fop.area.Trait; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBackground; /** * This is a helper class used for setting common traits on areas. @@ -67,39 +67,39 @@ public class TraitSetter { * @param bpProps border and padding properties */ public static void setBorderPaddingTraits(Area area, - BorderAndPadding bpProps, boolean bNotFirst, boolean bNotLast) { + CommonBorderAndPadding bpProps, boolean bNotFirst, boolean bNotLast) { int iBP; - iBP = bpProps.getPadding(BorderAndPadding.START, bNotFirst); + iBP = bpProps.getPadding(CommonBorderAndPadding.START, bNotFirst); if (iBP > 0) { //area.addTrait(new Trait(Trait.PADDING_START, new Integer(iBP))); area.addTrait(Trait.PADDING_START, new Integer(iBP)); } - iBP = bpProps.getPadding(BorderAndPadding.END, bNotLast); + iBP = bpProps.getPadding(CommonBorderAndPadding.END, bNotLast); if (iBP > 0) { //area.addTrait(new Trait(Trait.PADDING_END, new Integer(iBP))); area.addTrait(Trait.PADDING_END, new Integer(iBP)); } - iBP = bpProps.getPadding(BorderAndPadding.BEFORE, false); + iBP = bpProps.getPadding(CommonBorderAndPadding.BEFORE, false); if (iBP > 0) { // area.addTrait(new Trait(Trait.PADDING_BEFORE, new Integer(iBP))); area.addTrait(Trait.PADDING_BEFORE, new Integer(iBP)); } - iBP = bpProps.getPadding(BorderAndPadding.AFTER, false); + iBP = bpProps.getPadding(CommonBorderAndPadding.AFTER, false); if (iBP > 0) { //area.addTrait(new Trait(Trait.PADDING_AFTER, new Integer(iBP))); area.addTrait(Trait.PADDING_AFTER, new Integer(iBP)); } addBorderTrait(area, bpProps, bNotFirst, - BorderAndPadding.START, Trait.BORDER_START); + CommonBorderAndPadding.START, Trait.BORDER_START); - addBorderTrait(area, bpProps, bNotLast, BorderAndPadding.END, + addBorderTrait(area, bpProps, bNotLast, CommonBorderAndPadding.END, Trait.BORDER_END); - addBorderTrait(area, bpProps, false, BorderAndPadding.BEFORE, + addBorderTrait(area, bpProps, false, CommonBorderAndPadding.BEFORE, Trait.BORDER_BEFORE); - addBorderTrait(area, bpProps, false, BorderAndPadding.AFTER, + addBorderTrait(area, bpProps, false, CommonBorderAndPadding.AFTER, Trait.BORDER_AFTER); } @@ -109,7 +109,7 @@ public class TraitSetter { * @param bpProps border and padding properties */ private static void addBorderTrait(Area area, - BorderAndPadding bpProps, + CommonBorderAndPadding bpProps, boolean bDiscard, int iSide, Object oTrait) { int iBP = bpProps.getBorderWidth(iSide, bDiscard); @@ -131,26 +131,26 @@ public class TraitSetter { * @param curBlock area to set the traits on * @param bordProps border properties */ - public static void addBorders(Area curBlock, BorderAndPadding bordProps) { - BorderProps bps = getBorderProps(bordProps, BorderAndPadding.TOP); + public static void addBorders(Area curBlock, CommonBorderAndPadding bordProps) { + BorderProps bps = getBorderProps(bordProps, CommonBorderAndPadding.TOP); if (bps.width != 0) { curBlock.addTrait(Trait.BORDER_BEFORE, bps); } - bps = getBorderProps(bordProps, BorderAndPadding.BOTTOM); + bps = getBorderProps(bordProps, CommonBorderAndPadding.BOTTOM); if (bps.width != 0) { curBlock.addTrait(Trait.BORDER_AFTER, bps); } - bps = getBorderProps(bordProps, BorderAndPadding.LEFT); + bps = getBorderProps(bordProps, CommonBorderAndPadding.LEFT); if (bps.width != 0) { curBlock.addTrait(Trait.BORDER_START, bps); } - bps = getBorderProps(bordProps, BorderAndPadding.RIGHT); + bps = getBorderProps(bordProps, CommonBorderAndPadding.RIGHT); if (bps.width != 0) { curBlock.addTrait(Trait.BORDER_END, bps); } } - private static BorderProps getBorderProps(BorderAndPadding bordProps, int side) { + private static BorderProps getBorderProps(CommonBorderAndPadding bordProps, int side) { BorderProps bps; bps = new BorderProps(bordProps.getBorderStyle(side), bordProps.getBorderWidth(side, false), @@ -165,7 +165,7 @@ public class TraitSetter { * @param curBlock the current block * @param backProps the background properties */ - public static void addBackground(Area curBlock, BackgroundProps backProps) { + public static void addBackground(Area curBlock, CommonBackground backProps) { Trait.Background back = new Trait.Background(); back.setColor(backProps.backColor); diff --git a/src/java/org/apache/fop/layoutmgr/list/Item.java b/src/java/org/apache/fop/layoutmgr/list/Item.java index 1b1e0d511..c9f4ff297 100644 --- a/src/java/org/apache/fop/layoutmgr/list/Item.java +++ b/src/java/org/apache/fop/layoutmgr/list/Item.java @@ -63,8 +63,8 @@ import org.apache.fop.layoutmgr.TraitSetter; import org.apache.fop.area.Area; import org.apache.fop.area.Block; import org.apache.fop.layoutmgr.MinOptMax; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import java.util.ArrayList; import java.util.List; @@ -75,8 +75,8 @@ import java.util.List; */ public class Item extends BlockStackingLayoutManager { - private BorderAndPadding borderProps = null; - private BackgroundProps backgroundProps; + private CommonBorderAndPadding borderProps = null; + private CommonBackground backgroundProps; private Block curBlockArea; diff --git a/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java index 829f5289b..1ac46d33d 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java @@ -63,8 +63,8 @@ import org.apache.fop.layoutmgr.TraitSetter; import org.apache.fop.area.Area; import org.apache.fop.area.Block; import org.apache.fop.layoutmgr.MinOptMax; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import java.util.ArrayList; import java.util.List; @@ -75,8 +75,8 @@ import java.util.List; * the list block area.. */ public class ListBlockLayoutManager extends BlockStackingLayoutManager { - private BorderAndPadding borderProps = null; - private BackgroundProps backgroundProps; + private CommonBorderAndPadding borderProps = null; + private CommonBackground backgroundProps; private Block curBlockArea; diff --git a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java index ab9cc67a3..60ec598b1 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java @@ -62,8 +62,8 @@ import org.apache.fop.layoutmgr.Position; import org.apache.fop.area.Area; import org.apache.fop.area.Block; import org.apache.fop.layoutmgr.MinOptMax; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import java.util.Iterator; import java.util.ArrayList; @@ -81,8 +81,8 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager { private List cellList = null; private int listItemHeight; - private BorderAndPadding borderProps = null; - private BackgroundProps backgroundProps; + private CommonBorderAndPadding borderProps = null; + private CommonBackground backgroundProps; private class ItemPosition extends LeafPosition { protected List cellBreaks; diff --git a/src/java/org/apache/fop/layoutmgr/table/Body.java b/src/java/org/apache/fop/layoutmgr/table/Body.java index 8fafaa04b..f58d6ea4b 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Body.java +++ b/src/java/org/apache/fop/layoutmgr/table/Body.java @@ -63,8 +63,8 @@ import org.apache.fop.layoutmgr.TraitSetter; import org.apache.fop.area.Area; import org.apache.fop.area.Block; import org.apache.fop.layoutmgr.MinOptMax; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import java.util.ArrayList; import java.util.List; @@ -75,8 +75,8 @@ import java.util.List; * Cells are organised into rows. */ public class Body extends BlockStackingLayoutManager { - private BorderAndPadding borderProps = null; - private BackgroundProps backgroundProps; + private CommonBorderAndPadding borderProps = null; + private CommonBackground backgroundProps; private boolean rows = true; private List columns; diff --git a/src/java/org/apache/fop/layoutmgr/table/Cell.java b/src/java/org/apache/fop/layoutmgr/table/Cell.java index 4ae283e8b..08f1d8402 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Cell.java +++ b/src/java/org/apache/fop/layoutmgr/table/Cell.java @@ -63,8 +63,8 @@ import org.apache.fop.layoutmgr.TraitSetter; import org.apache.fop.area.Area; import org.apache.fop.area.Block; import org.apache.fop.layoutmgr.MinOptMax; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import java.util.ArrayList; import java.util.List; @@ -75,8 +75,8 @@ import java.util.List; */ public class Cell extends BlockStackingLayoutManager { - private BorderAndPadding borderProps = null; - private BackgroundProps backgroundProps; + private CommonBorderAndPadding borderProps = null; + private CommonBackground backgroundProps; private Block curBlockArea; diff --git a/src/java/org/apache/fop/layoutmgr/table/Column.java b/src/java/org/apache/fop/layoutmgr/table/Column.java index ec33ce022..2cf42e796 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Column.java +++ b/src/java/org/apache/fop/layoutmgr/table/Column.java @@ -60,8 +60,8 @@ import org.apache.fop.layoutmgr.TraitSetter; import org.apache.fop.fo.flow.TableColumn; import org.apache.fop.area.Area; import org.apache.fop.area.Block; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; /** * LayoutManager for a table-column FO. @@ -71,8 +71,8 @@ import org.apache.fop.layout.BackgroundProps; */ public class Column extends AbstractLayoutManager { private int columnWidth; - private BorderAndPadding borderProps = null; - private BackgroundProps backgroundProps; + private CommonBorderAndPadding borderProps = null; + private CommonBackground backgroundProps; /** * Create a new column layout manager. diff --git a/src/java/org/apache/fop/layoutmgr/table/Row.java b/src/java/org/apache/fop/layoutmgr/table/Row.java index e55555a1a..cab411241 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Row.java +++ b/src/java/org/apache/fop/layoutmgr/table/Row.java @@ -63,8 +63,8 @@ import org.apache.fop.layoutmgr.TraitSetter; import org.apache.fop.area.Area; import org.apache.fop.area.Block; import org.apache.fop.layoutmgr.MinOptMax; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import java.util.Iterator; import java.util.ArrayList; @@ -83,8 +83,8 @@ public class Row extends BlockStackingLayoutManager { private List columns = null; private int rowHeight; private int yoffset; - private BorderAndPadding borderProps = null; - private BackgroundProps backgroundProps; + private CommonBorderAndPadding borderProps = null; + private CommonBackground backgroundProps; private class RowPosition extends LeafPosition { protected List cellBreaks; diff --git a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java index 77c75f638..dd6c494c8 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java @@ -63,8 +63,8 @@ import org.apache.fop.layoutmgr.TraitSetter; import org.apache.fop.area.Area; import org.apache.fop.area.Block; import org.apache.fop.layoutmgr.MinOptMax; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import java.util.ArrayList; import java.util.List; @@ -82,8 +82,8 @@ public class TableLayoutManager extends BlockStackingLayoutManager { private Body tableHeader = null; private Body tableFooter = null; - private BorderAndPadding borderProps = null; - private BackgroundProps backgroundProps; + private CommonBorderAndPadding borderProps = null; + private CommonBackground backgroundProps; private Block curBlockArea;