import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FOUserAgent;
+import org.apache.fop.fo.flow.Marker;
import org.apache.fop.area.Area;
import org.apache.fop.area.Resolveable;
import org.apache.fop.area.PageViewport;
import org.apache.fop.fo.PropertyManager;
-import org.apache.fop.area.Trait;
-import org.apache.fop.layout.BorderAndPadding;
-import org.apache.fop.layout.BackgroundProps;
-import org.apache.fop.traits.BorderProps;
import org.apache.avalon.framework.logger.Logger;
import java.util.ListIterator;
+import java.util.Map;
/**
* The base class for all LayoutManagers.
protected LayoutManager parentLM = null;
protected FObj fobj;
protected String foID = null;
+ protected Map markers = null;
/** True if this LayoutManager has handled all of its content. */
private boolean bFinished = false;
protected ListIterator childLMiter;
protected boolean bInited = false;
-
/**
* Abstract layout manager.
*/
public void setFObj(FObj fo) {
this.fobj = fo;
foID = fobj.getID();
+ markers = fobj.getMarkers();
childLMiter = new LMiter(fobj.getChildren());
}
userAgent = ua;
}
+ /**
+ * Get the user agent.
+ *
+ * @see org.apache.fop.layoutmgr.LayoutManager#getUserAgent()
+ */
public FOUserAgent getUserAgent() {
return userAgent;
}
parentLM.addUnresolvedArea(id, res);
}
+ /**
+ * Add the markers when adding an area.
+ */
+ protected void addMarkers(boolean start) {
+ // add markers
+ if (markers != null) {
+ addMarkerMap(markers, start);
+ }
+ }
+
/**
* Delegate adding marker to the parent layout manager.
*
* @see org.apache.fop.layoutmgr.LayoutManager
*/
- public void addMarker(String name, LayoutManager lm, boolean start) {
- parentLM.addMarker(name, lm, start);
+ public void addMarkerMap(Map marks, boolean start) {
+ parentLM.addMarkerMap(marks, start);
}
/**
*
* @see org.apache.fop.layoutmgr.LayoutManager
*/
- public LayoutManager retrieveMarker(String name, int pos, int boundary) {
+ public Marker retrieveMarker(String name, int pos, int boundary) {
return parentLM.retrieveMarker(name, pos, boundary);
}
- /**
- * Add borders to an area.
- * Layout managers that create areas with borders can use this to
- * add the borders to the area.
- */
- public static void addBorders(Area curBlock, BorderAndPadding bordProps) {
- BorderProps bps = getBorderProps(bordProps, BorderAndPadding.TOP);
- if(bps.width != 0) {
- curBlock.addTrait(Trait.BORDER_BEFORE, bps);
- }
- bps = getBorderProps(bordProps, BorderAndPadding.BOTTOM);
- if(bps.width != 0) {
- curBlock.addTrait(Trait.BORDER_AFTER, bps);
- }
- bps = getBorderProps(bordProps, BorderAndPadding.LEFT);
- if(bps.width != 0) {
- curBlock.addTrait(Trait.BORDER_START, bps);
- }
- bps = getBorderProps(bordProps, BorderAndPadding.RIGHT);
- if(bps.width != 0) {
- curBlock.addTrait(Trait.BORDER_END, bps);
- }
- }
-
- private static BorderProps getBorderProps(BorderAndPadding bordProps, int side) {
- BorderProps bps;
- bps = new BorderProps(bordProps.getBorderStyle(side),
- bordProps.getBorderWidth(side, false),
- bordProps.getBorderColor(side));
- return bps;
- }
-
- /**
- * Add background to an area.
- * Layout managers that create areas with a background can use this to
- * add the background to the area.
- */
- public static void addBackground(Area curBlock, BackgroundProps backProps) {
- Trait.Background back = new Trait.Background();
- back.color = backProps.backColor;
-
- if(backProps.backImage != null) {
- back.url = backProps.backImage;
- back.repeat = backProps.backRepeat;
- if(backProps.backPosHorizontal != null) {
- back.horiz = backProps.backPosHorizontal.mvalue();
- }
- if(backProps.backPosVertical != null) {
- back.vertical = backProps.backPosVertical.mvalue();
- }
- }
-
- if(back.color != null || back.url != null) {
- curBlock.addTrait(Trait.BACKGROUND, back);
- }
- }
}
package org.apache.fop.layoutmgr;
-import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.TextInfo;
import org.apache.fop.area.Area;
-import org.apache.fop.area.BlockParent;
import org.apache.fop.area.BlockViewport;
import org.apache.fop.area.Block;
-import org.apache.fop.area.LineArea;
import org.apache.fop.fo.PropertyManager;
import org.apache.fop.layout.AbsolutePositionProps;
import org.apache.fop.fo.properties.AbsolutePosition;
import org.apache.fop.area.CTM;
import org.apache.fop.datatypes.FODimension;
-import java.util.ListIterator;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.awt.geom.Rectangle2D;
int overflow;
PropertyManager propManager;
+ /**
+ * Create a new block container layout manager.
+ */
public BlockContainerLayoutManager() {
}
LayoutContext layoutContext) {
getParentArea(null);
+ addID();
+ addMarkers(true);
+
LayoutManager childLM ;
int iStartPos = 0;
LayoutContext lc = new LayoutContext(0);
curBlockArea = null;
}
+ /**
+ * Get the parent area for children of this block container.
+ * This returns the current block container area
+ * and creates it if required.
+ *
+ * @see org.apache.fop.layoutmgr.LayoutManager#getParentArea(Area)
+ */
public Area getParentArea(Area childArea) {
if (curBlockArea == null) {
viewportBlockArea = new BlockViewport();
return curBlockArea;
}
-
+ /**
+ * Add the child to the block container.
+ *
+ * @see org.apache.fop.layoutmgr.LayoutManager#addChild(Area)
+ */
public void addChild(Area childArea) {
if (curBlockArea != null) {
curBlockArea.addBlock((Block) childArea);
}
}
- public void addMarker(String name, LayoutManager lm, boolean start) {
- parentLM.addMarker(name, lm, start);
+ public void addMarkerMap(Map marks, boolean start) {
+ parentLM.addMarkerMap(marks, start);
}
}
import org.apache.fop.fo.TextInfo;
import org.apache.fop.fo.PropertyManager;
import org.apache.fop.area.Area;
-import org.apache.fop.area.BlockParent;
import org.apache.fop.area.Block;
import org.apache.fop.area.LineArea;
-import org.apache.fop.area.Trait;
import org.apache.fop.traits.LayoutProps;
import org.apache.fop.layout.BorderAndPadding;
import org.apache.fop.layout.BackgroundProps;
-import org.apache.fop.traits.SpaceVal;
-import org.apache.fop.traits.BorderProps;
import java.util.ListIterator;
import java.util.ArrayList;
inlines.add(firstlm);
while (proxy.hasNext()) {
lm = (LayoutManager) proxy.next();
+ lm.setParentLM(BlockLayoutManager.this);
if (lm.generatesInlineAreas()) {
inlines.add(lm);
} else {
addBlockSpacing(adjust, layoutProps.spaceBefore.space);
addID();
+ addMarkers(true);
LayoutManager childLM ;
LayoutContext lc = new LayoutContext(0);
curBlockArea = new Block();
// set traits
- addBorders(curBlockArea, borderProps);
- addBackground(curBlockArea, backgroundProps);
+ TraitSetter.addBorders(curBlockArea, borderProps);
+ TraitSetter.addBackground(curBlockArea, backgroundProps);
// Set up dimensions
// Must get dimensions from parent area
package org.apache.fop.layoutmgr;
-import org.apache.fop.fo.FObj;
import org.apache.fop.area.Area;
import org.apache.fop.area.BlockParent;
import org.apache.fop.area.Block;
-import java.util.Iterator;
-
/**
* Base LayoutManager class for all areas which stack their child
* areas in the block-progression direction, such as Flow, Block, ListBlock.
/*
* $Id$
- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
*/
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FOUserAgent;
+import org.apache.fop.fo.flow.Marker;
import org.apache.fop.area.Area;
import org.apache.fop.area.Resolveable;
import org.apache.fop.area.PageViewport;
import org.apache.avalon.framework.logger.Logger;
import java.util.List;
+import java.util.Map;
import java.util.ArrayList;
-
/**
* Content Layout Manager.
* For use with objects that contain inline areas such as
}
/** @see org.apache.fop.layoutmgr.LayoutManager */
- public void addMarker(String name, LayoutManager lm, boolean start) {
- parentLM.addMarker(name, lm, start);
+ public void addMarkerMap(Map marks, boolean start) {
+ parentLM.addMarkerMap(marks, start);
}
/** @see org.apache.fop.layoutmgr.LayoutManager */
- public LayoutManager retrieveMarker(String name, int pos, int boundary) {
+ public Marker retrieveMarker(String name, int pos, int boundary) {
return parentLM.retrieveMarker(name, pos, boundary);
}
}
/*
* $Id$
- * Copyright (C) 2002 The Apache Software Foundation. All rights reserved.
+ * Copyright (C) 2002-2003 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
*/
package org.apache.fop.layoutmgr;
-import org.apache.fop.apps.FOPException;
-import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.properties.Constants;
-import org.apache.fop.area.*;
+import org.apache.fop.fo.flow.Marker;
+import org.apache.fop.area.Area;
+import org.apache.fop.area.BlockParent;
import java.util.ArrayList;
import java.util.List;
/** Array of areas currently being filled stored by area class */
private BlockParent[] currentAreas = new BlockParent[Area.CLASS_MAX];
+ int iStartPos = 0;
+
/**
* This is the top level layout manager.
* It is created by the PageSequence FO.
return null;
}
- int iStartPos = 0;
-
public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {
LayoutManager childLM;
flush();
}
-
/**
* Add child area to a the correct container, depending on its
* area class. A Flow can fill at most one area container of any class
*
* @see org.apache.fop.layoutmgr.LayoutManager
*/
- public LayoutManager retrieveMarker(String name, int pos, int boundary) {
+ public Marker retrieveMarker(String name, int pos, int boundary) {
// error cannot retrieve markers in flow
getLogger().error("Cannot retrieve a marker from the flow");
return null;
borderProps, bAreaCreated, !bIsLast);
if(borderProps != null) {
- addBorders(getCurrentArea(), borderProps);
+ TraitSetter.addBorders(getCurrentArea(), borderProps);
}
if(backgroundProps != null) {
- addBackground(getCurrentArea(), backgroundProps);
+ TraitSetter.addBackground(getCurrentArea(), backgroundProps);
}
parentLM.addChild(getCurrentArea());
import org.apache.fop.fo.FOUserAgent;
import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.flow.Marker;
import org.apache.fop.area.Area;
import org.apache.fop.area.Resolveable;
import org.apache.fop.area.PageViewport;
+import java.util.Map;
+
/**
* The interface for all LayoutManagers.
*/
public void setFObj(FObj obj);
/**
- * Set the user agent.
+ * Set the user agent. For resolving user agent values
+ * and getting logger.
*
* @param ua the user agent
*/
*/
public void setParentLM(LayoutManager lm);
+ /**
+ * Initialise this layout manager.
+ */
public void init();
/**
/**
* Return true if the next area which would be generated by this
* LayoutManager could start a new line (or flow for block-level FO).
+ *
+ * @param lc the layout context
+ * @return true if can break before
*/
public boolean canBreakBefore(LayoutContext lc);
/**
* Generate and return the next break possibility.
+ *
* @param context The layout context contains information about pending
* space specifiers from ancestor areas or previous areas, reference
* area inline-progression-dimension and various other layout-related
* information.
+ * @return the next break position
*/
public BreakPoss getNextBreakPoss(LayoutContext context);
-
+ /**
+ * Reset to the position.
+ *
+ * @param position
+ */
public void resetPosition(Position position);
+ /**
+ * Get the word chars between two positions and
+ * append to the string buffer. The positions could
+ * span multiple layout managers.
+ *
+ * @param sbChars the string buffer to append the word chars
+ * @param bp1 the start position
+ * @param bp2 the end position
+ */
public void getWordChars(StringBuffer sbChars, Position bp1,
Position bp2);
/**
* Return a value indicating whether this LayoutManager has laid out
* all its content (or generated BreakPossibilities for all content.)
+ *
+ * @return true if this layout manager is finished
*/
public boolean isFinished();
* Set a flag indicating whether the LayoutManager has laid out all
* its content. This is generally called by the LM itself, but can
* be called by a parentLM when backtracking.
+ *
+ * @param isFinished the value to set the finished flag to
*/
public void setFinished(boolean isFinished);
+ /**
+ * Get the parent area for an area.
+ * This should get the parent depending on the class of the
+ * area passed in.
+ *
+ * @param childArea the child area to get the parent for
+ * @return the parent Area
+ */
public Area getParentArea(Area childArea);
+
+ /**
+ * Add the area as a child of the current area.
+ * This is called by child layout managers to add their
+ * areas as children of the current area.
+ *
+ * @param childArea the child area to add
+ */
public void addChild(Area childArea);
/**
* Tell the layout manager to add all the child areas implied
* by Position objects which will be returned by the
* Iterator.
+ *
+ * @param posIter the position iterator
+ * @param context the context
*/
public void addAreas(PositionIterator posIter, LayoutContext context);
* @param lm the layout manager of the marker child
* @param start true if the formatting object is starting false is finishing
*/
- public void addMarker(String name, LayoutManager lm, boolean start);
+ public void addMarkerMap(Map marks, boolean start);
/**
* Retrieve a marker.
* @param boundary the boundary for retrieving the marker
* @return the layout manaager of the retrieved marker if any
*/
- public LayoutManager retrieveMarker(String name, int pos, int boundary);
+ public Marker retrieveMarker(String name, int pos, int boundary);
}
-
package org.apache.fop.layoutmgr;
-import org.apache.fop.fo.FObj;
import org.apache.fop.area.Area;
import org.apache.fop.area.inline.InlineArea;
import org.apache.fop.fo.properties.VerticalAlign;
package org.apache.fop.layoutmgr;
-
-import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.TextInfo;
import org.apache.fop.fo.PropertyManager;
import org.apache.fop.layout.MarginProps;
import org.apache.fop.layout.HyphenationProps;
import org.apache.fop.layout.hyphenation.Hyphenation;
import org.apache.fop.layout.hyphenation.Hyphenator;
import org.apache.fop.traits.BlockProps;
-import org.apache.fop.area.Area;
import org.apache.fop.area.LineArea;
-import org.apache.fop.area.inline.InlineArea;
import org.apache.fop.area.Resolveable;
import org.apache.fop.fo.properties.TextAlign;
-import org.apache.fop.area.inline.Word;
-import org.apache.fop.area.inline.Space;
-import org.apache.fop.area.inline.Character;
-
import java.util.ListIterator;
import java.util.Iterator;
import java.util.List;
import java.util.ArrayList;
-
/**
* LayoutManager for lines. It builds one or more lines containing
* inline areas generated by its sub layout managers.
public int opt;
public int max;
+ /**
+ * New min/opt/max with zero values.
+ */
public MinOptMax() {
this(0);
}
+ /**
+ * New min/opt/max with one fixed value.
+ *
+ * @param val the value for min, opt and max
+ */
public MinOptMax(int val) {
this(val, val, val);
}
+ /**
+ * New min/opt/max with the three values.
+ *
+ * @param min the minimum value
+ * @param opt the optimum value
+ * @param max the maximum value
+ */
public MinOptMax(int min, int opt, int max) {
this.min = min;
this.opt = opt;
import org.apache.fop.area.BeforeFloat;
import org.apache.fop.area.Footnote;
import org.apache.fop.area.Resolveable;
+import org.apache.fop.fo.flow.Marker;
import org.apache.fop.fo.flow.StaticContent;
import org.apache.fop.fo.pagination.PageSequence;
import org.apache.fop.fo.pagination.Region;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
/**
* LayoutManager for a PageSequence and its flow.
* @param lm the layout manager for the marker contents
* @param start true if starting marker area, false for ending
*/
- public void addMarker(String name, LayoutManager lm, boolean start) {
- if (start) {
- // add marker to page on area tree
- } else {
- // add end marker to page on area tree
- }
+ public void addMarkerMap(Map marks, boolean start) {
+ getLogger().debug("adding markers: " + marks + ":" + start);
+ // add markers to page on area tree
+ curPage.addMarkers(marks, start);
}
/**
* @param boundary the boundary for locating the marker
* @return the layout manager for the marker contents
*/
- public LayoutManager retrieveMarker(String name, int pos, int boundary) {
+ public Marker retrieveMarker(String name, int pos, int boundary) {
// get marker from the current markers on area tree
- return null;
+ Marker mark = (Marker)curPage.getMarker(name, pos);
+ return mark;
}
/**
protected void placeBeforeFloat(Area area) {
}
-
protected void placeSideFloat(Area area) {
}
--- /dev/null
+/*
+ * $Id$
+ * Copyright (C) 2003 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ */
+
+package org.apache.fop.layoutmgr;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.fop.area.Area;
+import org.apache.fop.fo.flow.Marker;
+
+/**
+ * LayoutManager for a block FO.
+ */
+public class RetrieveMarkerLayoutManager extends AbstractLayoutManager {
+ private LayoutManager replaceLM = null;
+ private boolean loaded = false;
+ private String name;
+
+ /**
+ * Create a new block container layout manager.
+ */
+ public RetrieveMarkerLayoutManager(String n, int pos, int bound) {
+ name = n;
+ }
+
+ public boolean generatesInlineAreas() {
+ loadLM();
+ if (replaceLM == null) {
+ return true;
+ }
+ return replaceLM.generatesInlineAreas();
+ }
+
+ public BreakPoss getNextBreakPoss(LayoutContext context) {
+ loadLM();
+ if (replaceLM == null) {
+ return null;
+ }
+ getLogger().debug("getting breaks");
+ return replaceLM.getNextBreakPoss(context);
+ }
+
+ public void addAreas(PositionIterator parentIter,
+ LayoutContext layoutContext) {
+
+ loadLM();
+ addID();
+ replaceLM.addAreas(parentIter, layoutContext);
+
+ }
+
+ public boolean isFinished() {
+ if (replaceLM == null) {
+ return true;
+ }
+ return replaceLM.isFinished();
+ }
+
+ public void setFinished(boolean fin) {
+ if (replaceLM != null) {
+ replaceLM.setFinished(fin);
+ }
+ }
+
+ protected void loadLM() {
+ if (loaded) {
+ return;
+ }
+ loaded = true;
+ if (replaceLM == null) {
+ List list = new ArrayList();
+ Marker marker = retrieveMarker(name, 0, 0);
+ marker.addLayoutManager(list);
+ if (list.size() > 0) {
+ replaceLM = (LayoutManager)list.get(0);
+ replaceLM.setParentLM(this);
+ replaceLM.init();
+ getLogger().debug("retrieved: " + replaceLM + ":" + list.size());
+ } else {
+ getLogger().debug("found no marker with name: " + name);
+ }
+ }
+ }
+
+ /**
+ * Get the parent area for children of this block container.
+ * This returns the current block container area
+ * and creates it if required.
+ *
+ * @see org.apache.fop.layoutmgr.LayoutManager#getParentArea(Area)
+ */
+ public Area getParentArea(Area childArea) {
+ return parentLM.getParentArea(childArea);
+ }
+
+ /**
+ * Add the child to the block container.
+ *
+ * @see org.apache.fop.layoutmgr.LayoutManager#addChild(Area)
+ */
+ public void addChild(Area childArea) {
+ parentLM.addChild(childArea);
+ }
+
+ public void resetPosition(Position resetPos) {
+ loadLM();
+ if (resetPos == null) {
+ reset(null);
+ }
+ if (replaceLM != null) {
+ replaceLM.resetPosition(resetPos);
+ }
+ loaded = false;
+ replaceLM = null;
+ }
+
+}
+
package org.apache.fop.layoutmgr;
-import org.apache.fop.fo.FObj;
import org.apache.fop.area.RegionReference;
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
package org.apache.fop.layoutmgr;
-import org.apache.fop.fo.FObj;
import org.apache.fop.fo.TextInfo;
import org.apache.fop.traits.SpaceVal;
-import org.apache.fop.area.Area;
-import org.apache.fop.area.LineArea;
import org.apache.fop.area.Trait;
import org.apache.fop.area.inline.InlineArea;
import org.apache.fop.area.inline.Word;
import org.apache.fop.area.inline.Space;
import org.apache.fop.util.CharUtilities;
-import org.apache.fop.fo.properties.VerticalAlign;
-
-//import org.apache.fop.fo.properties.*;
import java.util.ArrayList;
-import java.util.List;
/**
* LayoutManager for text (a sequence of characters) which generates one
import org.apache.fop.traits.BorderProps;
import org.apache.fop.area.Area;
import org.apache.fop.area.Trait;
+import org.apache.fop.layout.BackgroundProps;
public class TraitSetter {
}
}
+ /**
+ * Add borders to an area.
+ * Layout managers that create areas with borders can use this to
+ * add the borders to the area.
+ */
+ public static void addBorders(Area curBlock, BorderAndPadding bordProps) {
+ BorderProps bps = getBorderProps(bordProps, BorderAndPadding.TOP);
+ if(bps.width != 0) {
+ curBlock.addTrait(Trait.BORDER_BEFORE, bps);
+ }
+ bps = getBorderProps(bordProps, BorderAndPadding.BOTTOM);
+ if(bps.width != 0) {
+ curBlock.addTrait(Trait.BORDER_AFTER, bps);
+ }
+ bps = getBorderProps(bordProps, BorderAndPadding.LEFT);
+ if(bps.width != 0) {
+ curBlock.addTrait(Trait.BORDER_START, bps);
+ }
+ bps = getBorderProps(bordProps, BorderAndPadding.RIGHT);
+ if(bps.width != 0) {
+ curBlock.addTrait(Trait.BORDER_END, bps);
+ }
+ }
+
+ private static BorderProps getBorderProps(BorderAndPadding bordProps, int side) {
+ BorderProps bps;
+ bps = new BorderProps(bordProps.getBorderStyle(side),
+ bordProps.getBorderWidth(side, false),
+ bordProps.getBorderColor(side));
+ return bps;
+ }
+
+ /**
+ * Add background to an area.
+ * Layout managers that create areas with a background can use this to
+ * add the background to the area.
+ */
+ public static void addBackground(Area curBlock, BackgroundProps backProps) {
+ Trait.Background back = new Trait.Background();
+ back.color = backProps.backColor;
+
+ if(backProps.backImage != null) {
+ back.url = backProps.backImage;
+ back.repeat = backProps.backRepeat;
+ if(backProps.backPosHorizontal != null) {
+ back.horiz = backProps.backPosHorizontal.mvalue();
+ }
+ if(backProps.backPosVertical != null) {
+ back.vertical = backProps.backPosVertical.mvalue();
+ }
+ }
+
+ if(back.color != null || back.url != null) {
+ curBlock.addTrait(Trait.BACKGROUND, back);
+ }
+ }
}
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.BreakPossPosIter;
import org.apache.fop.layoutmgr.Position;
-import org.apache.fop.fo.FObj;
+import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
import org.apache.fop.layoutmgr.MinOptMax;
}
if (borderProps != null) {
- addBorders(curBlockArea, borderProps);
+ TraitSetter.addBorders(curBlockArea, borderProps);
}
if (backgroundProps != null) {
- addBackground(curBlockArea, backgroundProps);
+ TraitSetter.addBackground(curBlockArea, backgroundProps);
}
flush();
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.BreakPossPosIter;
import org.apache.fop.layoutmgr.Position;
-import org.apache.fop.fo.FObj;
+import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
import org.apache.fop.layoutmgr.MinOptMax;
}
if(borderProps != null) {
- addBorders(curBlockArea, borderProps);
+ TraitSetter.addBorders(curBlockArea, borderProps);
}
if(backgroundProps != null) {
- addBackground(curBlockArea, backgroundProps);
+ TraitSetter.addBackground(curBlockArea, backgroundProps);
}
flush();
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.BreakPossPosIter;
import org.apache.fop.layoutmgr.Position;
-import org.apache.fop.fo.FObj;
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
import org.apache.fop.layoutmgr.MinOptMax;
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.BreakPossPosIter;
import org.apache.fop.layoutmgr.Position;
-import org.apache.fop.fo.FObj;
+import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
import org.apache.fop.layoutmgr.MinOptMax;
Area curBlockArea = new Block();
if(backgroundProps != null) {
- addBackground(curBlockArea, backgroundProps);
+ TraitSetter.addBackground(curBlockArea, backgroundProps);
}
return curBlockArea;
}
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.BreakPossPosIter;
import org.apache.fop.layoutmgr.Position;
-import org.apache.fop.fo.FObj;
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
import org.apache.fop.layoutmgr.MinOptMax;
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.BreakPossPosIter;
import org.apache.fop.layoutmgr.Position;
-import org.apache.fop.fo.FObj;
+import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
import org.apache.fop.layoutmgr.MinOptMax;
}
if(borderProps != null) {
- addBorders(curBlockArea, borderProps);
+ TraitSetter.addBorders(curBlockArea, borderProps);
}
if(backgroundProps != null) {
- addBackground(curBlockArea, backgroundProps);
+ TraitSetter.addBackground(curBlockArea, backgroundProps);
}
curBlockArea.setHeight(height);
import org.apache.fop.layoutmgr.BreakPoss;
import org.apache.fop.layoutmgr.LayoutContext;
import org.apache.fop.layoutmgr.PositionIterator;
+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;
Area curBlockArea = new Block();
if(backgroundProps != null) {
- addBackground(curBlockArea, backgroundProps);
+ TraitSetter.addBackground(curBlockArea, backgroundProps);
}
return curBlockArea;
}
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.BreakPossPosIter;
import org.apache.fop.layoutmgr.Position;
-import org.apache.fop.fo.FObj;
+import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
import org.apache.fop.layoutmgr.MinOptMax;
public Area getRowArea() {
Area block = new Block();
if(backgroundProps != null) {
- addBackground(block, backgroundProps);
+ TraitSetter.addBackground(block, backgroundProps);
}
return block;
}
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.BreakPossPosIter;
import org.apache.fop.layoutmgr.Position;
-import org.apache.fop.fo.FObj;
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
import org.apache.fop.layoutmgr.MinOptMax;
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.BreakPossPosIter;
import org.apache.fop.layoutmgr.Position;
-import org.apache.fop.fo.FObj;
+import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
import org.apache.fop.layoutmgr.MinOptMax;
curBlockArea.setHeight(tableHeight);
if(borderProps != null) {
- addBorders(curBlockArea, borderProps);
+ TraitSetter.addBorders(curBlockArea, borderProps);
}
if(backgroundProps != null) {
- addBackground(curBlockArea, backgroundProps);
+ TraitSetter.addBackground(curBlockArea, backgroundProps);
}
flush();