diff options
author | William Victor Mote <vmote@apache.org> | 2003-08-12 18:02:46 +0000 |
---|---|---|
committer | William Victor Mote <vmote@apache.org> | 2003-08-12 18:02:46 +0000 |
commit | 6b7838777ffd2c2297971728addef851ffc30509 (patch) | |
tree | 9885e96b0eaecbad97316ff8be4bfefe8ea3e648 /src/java/org/apache/fop/layoutmgr | |
parent | b6dcb1e72da56b0b55ef41dc97245ce03501cfe9 (diff) | |
download | xmlgraphics-fop-6b7838777ffd2c2297971728addef851ffc30509.tar.gz xmlgraphics-fop-6b7838777ffd2c2297971728addef851ffc30509.zip |
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
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr')
13 files changed, 77 insertions, 77 deletions
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; |