/**
* The base class for all LayoutManagers.
*/
-public abstract class AbstractLayoutManager implements LayoutProcessor, Constants {
+public abstract class AbstractLayoutManager implements LayoutManager, Constants {
protected FOUserAgent userAgent;
- protected LayoutProcessor parentLM = null;
+ 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 LayoutProcessor curChildLM = null;
+ protected LayoutManager curChildLM = null;
protected ListIterator childLMiter;
protected boolean bInited = false;
return userAgent.getLogger();
}
- public void setParent(LayoutProcessor lm) {
+ public void setParent(LayoutManager lm) {
this.parentLM = lm;
}
- public LayoutProcessor getParent() {
+ public LayoutManager getParent() {
return this.parentLM;
}
* Note: child must implement LayoutManager! If it doesn't, skip it
* and print a warning.
*/
- protected LayoutProcessor getChildLM() {
+ protected LayoutManager getChildLM() {
if (curChildLM != null && !curChildLM.isFinished()) {
return curChildLM;
}
while (childLMiter.hasNext()) {
- curChildLM = (LayoutProcessor) childLMiter.next();
+ curChildLM = (LayoutManager) childLMiter.next();
curChildLM.setUserAgent(getUserAgent());
curChildLM.setParent(this);
curChildLM.initialize();
}
while (curChildLM != lm && childLMiter.hasPrevious()) {
curChildLM.resetPosition(null);
- curChildLM = (LayoutProcessor) childLMiter.previous();
+ curChildLM = (LayoutManager) childLMiter.previous();
}
// Otherwise next returns same object
childLMiter.next();
serveFObjMixed((FObjMixed)node);
currentLMList = saveLMList;
for (int count = childList.size() - 1; count >= 0; count--) {
- LayoutProcessor lm = (LayoutProcessor) childList.get(count);
+ LayoutManager lm = (LayoutManager) childList.get(count);
if (lm.generatesInlineAreas()) {
- LayoutProcessor blm = new BidiLayoutManager((InlineStackingLayoutManager) lm);
+ LayoutManager blm = new BidiLayoutManager((InlineStackingLayoutManager) lm);
blm.setFObj(node);
currentLMList.add(blm);
} else {
currentLMList.add(lm);
}
- protected void setupBasicLinkArea(BasicLink node, LayoutProcessor parentLM,
+ protected void setupBasicLinkArea(BasicLink node, LayoutManager parentLM,
InlineParent area) {
if (node.getLink() == null) {
return;
// if id can be resolved then simply return a word, otherwise
// return a resolveable area
public InlineArea getPageNumberCitationInlineArea(PageNumberCitation node,
- LayoutProcessor parentLM) {
+ LayoutManager parentLM) {
if (node.getRefId().equals("")) {
node.getLogger().error("page-number-citation must contain \"ref-id\"");
return null;
stackLimit = context.getStackLimit();
}
- LayoutProcessor curLM ; // currently active LM
+ LayoutManager curLM ; // currently active LM
MinOptMax stackSize = new MinOptMax();
// if starting add space before
public BreakPoss getAbsoluteBreakPoss(LayoutContext context) {
- LayoutProcessor curLM ; // currently active LM
+ LayoutManager curLM ; // currently active LM
MinOptMax stackSize = new MinOptMax();
addID();
addMarkers(true, true);
- LayoutProcessor childLM;
+ LayoutManager childLM;
int iStartPos = 0;
LayoutContext lc = new LayoutContext(0);
while (parentIter.hasNext()) {
* This returns the current block container area
* and creates it if required.
*
- * @see org.apache.fop.layoutmgr.LayoutProcessor#getParentArea(Area)
+ * @see org.apache.fop.layoutmgr.LayoutManager#getParentArea(Area)
*/
public Area getParentArea(Area childArea) {
if (curBlockArea == null) {
/**
* Add the child to the block container.
*
- * @see org.apache.fop.layoutmgr.LayoutProcessor#addChild(Area)
+ * @see org.apache.fop.layoutmgr.LayoutManager#addChild(Area)
*/
public void addChild(Area childArea) {
if (curBlockArea != null) {
private ListIterator proxy;
- public BlockLMiter(LayoutProcessor lp, ListIterator pr) {
+ public BlockLMiter(LayoutManager lp, ListIterator pr) {
super(lp, null);
proxy = pr;
}
protected boolean preLoadNext() {
while (proxy.hasNext()) {
- LayoutProcessor lm = (LayoutProcessor) proxy.next();
+ LayoutManager lm = (LayoutManager) proxy.next();
lm.setParent(BlockLayoutManager.this);
if (lm.generatesInlineAreas()) {
LineLayoutManager lineLM = createLineManager(lm);
protected LineLayoutManager createLineManager(
LayoutManager firstlm) {
- LayoutProcessor lm;
+ LayoutManager lm;
List inlines = new ArrayList();
inlines.add(firstlm);
while (proxy.hasNext()) {
- lm = (LayoutProcessor) proxy.next();
+ lm = (LayoutManager) proxy.next();
lm.setParent(BlockLayoutManager.this);
if (lm.generatesInlineAreas()) {
inlines.add(lm);
}
public BreakPoss getNextBreakPoss(LayoutContext context) {
- LayoutProcessor curLM; // currently active LM
+ LayoutManager curLM; // currently active LM
int ipd = context.getRefIPD();
int iIndents = marginProps.startIndent + marginProps.endIndent;
if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
// reset to last break
if (lastPos != null) {
- LayoutProcessor lm = lastPos.getLayoutManager();
+ LayoutManager lm = lastPos.getLayoutManager();
lm.resetPosition(lastPos.getPosition());
if (lm != curLM) {
curLM.resetPosition(null);
addID();
addMarkers(true, true);
- LayoutProcessor childLM;
+ LayoutManager childLM;
LayoutContext lc = new LayoutContext(0);
while (parentIter.hasNext()) {
LeafPosition lfp = (LeafPosition) parentIter.next();
* Reference to FO whose areas it's managing or to the traits
* of the FO.
*/
- protected LayoutProcessor curChildLM = null;
+ protected LayoutManager curChildLM = null;
protected BlockParent parentArea = null;
public BlockStackingLayoutManager() {
/**
* The top-level layout manager responsible for this break
*/
- public LayoutProcessor getLayoutManager() {
+ public LayoutManager getLayoutManager() {
return position.getLM();
}
return (BreakPoss) peekNext();
}
- protected LayoutProcessor getLM(Object nextObj) {
+ protected LayoutManager getLM(Object nextObj) {
return ((BreakPoss) nextObj).getLayoutManager();
}
* For use with objects that contain inline areas such as
* leader use-content and title.
*/
-public class ContentLayoutManager implements LayoutProcessor {
+public class ContentLayoutManager implements LayoutManager {
private FOUserAgent userAgent;
private Area holder;
private int stackSize;
- private LayoutProcessor parentLM;
+ private LayoutManager parentLM;
/**
* Constructs a new ContentLayoutManager
public void setFObj(FObj fo) {
}
- public void fillArea(LayoutProcessor curLM) {
+ public void fillArea(LayoutManager curLM) {
List childBreaks = new ArrayList();
MinOptMax stack = new MinOptMax();
}
/** @see org.apache.fop.layoutmgr.LayoutManager */
- public void setParent(LayoutProcessor lm) {
+ public void setParent(LayoutManager lm) {
parentLM = lm;
}
- public LayoutProcessor getParent() {
+ public LayoutManager getParent() {
return this.parentLM;
}
}
/**
- * @see org.apache.fop.layoutmgr.LayoutProcessor#getNextBreakPoss(LayoutContext)
+ * @see org.apache.fop.layoutmgr.LayoutManager#getNextBreakPoss(LayoutContext)
*/
public BreakPoss getNextBreakPoss(LayoutContext context) {
// currently active LM
- LayoutProcessor curLM;
+ LayoutManager curLM;
MinOptMax stackSize = new MinOptMax();
while ((curLM = getChildLM()) != null) {
}
/**
- * @see org.apache.fop.layoutmgr.LayoutProcessor#addAreas(PositionIterator, LayoutContext)
+ * @see org.apache.fop.layoutmgr.LayoutManager#addAreas(PositionIterator, LayoutContext)
*/
public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {
- LayoutProcessor childLM;
+ LayoutManager childLM;
LayoutContext lc = new LayoutContext(0);
while (parentIter.hasNext()) {
LeafPosition lfp = (LeafPosition) parentIter.next();
}
/**
- * @see org.apache.fop.layoutmgr.LayoutProcessor#getParentArea(Area)
+ * @see org.apache.fop.layoutmgr.LayoutManager#getParentArea(Area)
*/
public Area getParentArea(Area childArea) {
// Get an area from the Page
}
/**
- * @see org.apache.fop.layoutmgr.LayoutProcessor#resetPosition(Position)
+ * @see org.apache.fop.layoutmgr.LayoutManager#resetPosition(Position)
*/
public void resetPosition(Position resetPos) {
if (resetPos == null) {
super(parentIter);
}
- protected LayoutProcessor getLM(Object nextObj) {
+ protected LayoutManager getLM(Object nextObj) {
return ((Position) nextObj).getPosition().getLM();
}
if (inlineProps.spaceStart.getSpace().min > 0 || hasLeadingFence(false)) {
return true;
}
- LayoutProcessor lm = getChildLM();
+ LayoutManager lm = getChildLM();
if (lm != null) {
return lm.canBreakBefore(context);
} else {
public BreakPoss getNextBreakPoss(LayoutContext lc) {
// Get a break from currently active child LM
BreakPoss bp = null;
- LayoutProcessor curLM;
+ LayoutManager curLM;
SpaceSpecifier leadingSpace = lc.getLeadingSpace();
if (lc.startsNewArea()) {
// posIter iterates over positions returned by this LM
StackingIter childPosIter = new StackingIter(parentIter);
- LayoutProcessor prevLM = null;
- LayoutProcessor childLM ;
+ LayoutManager prevLM = null;
+ LayoutManager childLM ;
while ((childLM = childPosIter.getNextChildLM()) != null) {
//getContext().setTrailingSpace(new SpaceSpecifier(false));
childLM.addAreas(childPosIter, getContext());
private FObj curFO;
protected List listLMs;
protected int curPos = 0;
- /** The LayoutProcessor to which this LMiter is attached **/
- private LayoutProcessor lp;
+ /** The LayoutManager to which this LMiter is attached **/
+ private LayoutManager lp;
- public LMiter(LayoutProcessor lp, ListIterator bIter) {
+ public LMiter(LayoutManager lp, ListIterator bIter) {
this.lp = lp;
baseIter = bIter;
listLMs = new ArrayList(10);
package org.apache.fop.layoutmgr;
+import java.util.Map;
+
+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.apps.FOUserAgent;
import org.apache.fop.fo.FObj;
* @return the user agent
*/
FOUserAgent getUserAgent();
+
+ /**
+ * Set the parent layout manager.
+ * The parent layout manager is required for adding areas.
+ *
+ * @param lm the parent layout manager
+ */
+ void setParent(LayoutManager lm);
+
+ /**
+ * Get the parent layout manager.
+ * @return the parent layout manager.
+ */
+ LayoutManager getParent();
+
+ /**
+ * Get the LayoutManagerLS object that is at the top of the LM Tree
+ * @return the LayoutManagerLS object that is at the top of the LM Tree
+ */
+ LayoutManagerLS getLayoutManagerLS();
+
+ /**
+ * Initialize this layout manager.
+ */
+ void initialize();
+
+ /**
+ * Generates inline areas.
+ * This is used to check if the layout manager generates inline
+ * areas.
+ *
+ * @return true if the layout manager generates inline areas
+ */
+ boolean generatesInlineAreas();
+
+ /**
+ * 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
+ */
+ 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
+ */
+ BreakPoss getNextBreakPoss(LayoutContext context);
+
+ /**
+ * Reset to the position.
+ *
+ * @param position
+ */
+ 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
+ */
+ 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
+ */
+ 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
+ */
+ 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
+ */
+ 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
+ */
+ 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
+ */
+ void addAreas(PositionIterator posIter, LayoutContext context);
+
+ /**
+ * Get the string of the current page number.
+ *
+ * @return the string for the current page number
+ */
+ String getCurrentPageNumber();
+
+ /**
+ * Resolve the id reference.
+ * This is called by an area looking for an id reference.
+ * If the id reference is not found then it should add a resolveable object.
+ *
+ * @param ref the id reference
+ * @return the page containing the id reference or null if not found
+ */
+ PageViewport resolveRefID(String ref);
+
+ /**
+ * Add an id to the page.
+ * (todo) add the location of the area on the page
+ *
+ * @param id the id reference to add.
+ */
+ void addIDToPage(String id);
+
+ /**
+ * Add an unresolved area.
+ * The is used to add a resolveable object to the page for a given id.
+ *
+ * @param id the id reference this object needs for resolving
+ * @param res the resolveable object
+ */
+ void addUnresolvedArea(String id, Resolveable res);
+
+ /**
+ * Add the marker.
+ * A number of formatting objects may contain markers. This
+ * method is used to add those markers to the page.
+ *
+ * @param name the marker class name
+ * @param start true if the formatting object is starting false is finishing
+ * @param isfirst a flag for is first
+ */
+ void addMarkerMap(Map marks, boolean start, boolean isfirst);
+
+ /**
+ * Retrieve a marker.
+ * This method is used when retrieve a marker.
+ *
+ * @param name the class name of the marker
+ * @param pos the retrieve position
+ * @param boundary the boundary for retrieving the marker
+ * @return the layout manaager of the retrieved marker if any
+ */
+ Marker retrieveMarker(String name, int pos, int boundary);
}
+++ /dev/null
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.layoutmgr;
-
-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 LayoutProcessors.
- * This interface is used by the layout implementation to
- * do the layout and add the areas.
- */
-public interface LayoutProcessor extends LayoutManager {
-
- /**
- * Set the parent layout manager.
- * The parent layout manager is required for adding areas.
- *
- * @param lm the parent layout manager
- */
- void setParent(LayoutProcessor lm);
-
- /**
- * Get the parent layout manager.
- * @return the parent layout manager.
- */
- LayoutProcessor getParent();
-
- /**
- * Get the LayoutManagerLS object that is at the top of the LM Tree
- * @return the LayoutManagerLS object that is at the top of the LM Tree
- */
- LayoutManagerLS getLayoutManagerLS();
-
- /**
- * Initialize this layout manager.
- */
- void initialize();
-
- /**
- * Generates inline areas.
- * This is used to check if the layout manager generates inline
- * areas.
- *
- * @return true if the layout manager generates inline areas
- */
- boolean generatesInlineAreas();
-
- /**
- * 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
- */
- 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
- */
- BreakPoss getNextBreakPoss(LayoutContext context);
-
- /**
- * Reset to the position.
- *
- * @param position
- */
- 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
- */
- 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
- */
- 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
- */
- 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
- */
- 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
- */
- 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
- */
- void addAreas(PositionIterator posIter, LayoutContext context);
-
- /**
- * Get the string of the current page number.
- *
- * @return the string for the current page number
- */
- String getCurrentPageNumber();
-
- /**
- * Resolve the id reference.
- * This is called by an area looking for an id reference.
- * If the id reference is not found then it should add a resolveable object.
- *
- * @param ref the id reference
- * @return the page containing the id reference or null if not found
- */
- PageViewport resolveRefID(String ref);
-
- /**
- * Add an id to the page.
- * (todo) add the location of the area on the page
- *
- * @param id the id reference to add.
- */
- void addIDToPage(String id);
-
- /**
- * Add an unresolved area.
- * The is used to add a resolveable object to the page for a given id.
- *
- * @param id the id reference this object needs for resolving
- * @param res the resolveable object
- */
- void addUnresolvedArea(String id, Resolveable res);
-
- /**
- * Add the marker.
- * A number of formatting objects may contain markers. This
- * method is used to add those markers to the page.
- *
- * @param name the marker class name
- * @param start true if the formatting object is starting false is finishing
- * @param isfirst a flag for is first
- */
- void addMarkerMap(Map marks, boolean start, boolean isfirst);
-
- /**
- * Retrieve a marker.
- * This method is used when retrieve a marker.
- *
- * @param name the class name of the marker
- * @param pos the retrieve position
- * @param boundary the boundary for retrieving the marker
- * @return the layout manaager of the retrieved marker if any
- */
- Marker retrieveMarker(String name, int pos, int boundary);
-
-}
-
private int iLeafPos;
- public LeafPosition(LayoutProcessor lm, int pos) {
+ public LeafPosition(LayoutManager lm, int pos) {
super(lm);
iLeafPos = pos;
}
int lineHeight;
int baseline;
- LineBreakPosition(LayoutProcessor lm, int iBreakIndex,
+ LineBreakPosition(LayoutManager lm, int iBreakIndex,
double ipdA, double adjust, int ind, int lh, int bl) {
super(lm, iBreakIndex);
// iPos = iBreakIndex;
// Get a break from currently active child LM
// Set up constraints for inline level managers
- LayoutProcessor curLM ; // currently active LM
+ LayoutManager curLM ; // currently active LM
BreakPoss prev = null;
BreakPoss bp = null; // proposed BreakPoss
// See if could break before next area
// TODO: do we need to set anything on the layout context?
LayoutContext lc = new LayoutContext(0);
- LayoutProcessor nextLM = getChildLM();
+ LayoutManager nextLM = getChildLM();
return (nextLM == null || nextLM.canBreakBefore(lc));
}
}
* @param dSpaceAdjust the space adjustment
*/
public void addAreas(PositionIterator parentIter, double dSpaceAdjust) {
- LayoutProcessor childLM;
+ LayoutManager childLM;
LayoutContext lc = new LayoutContext(0);
while (parentIter.hasNext()) {
LineBreakPosition lbp = (LineBreakPosition) parentIter.next();
private Position subPos;
- public NonLeafPosition(LayoutProcessor lm, Position sub) {
+ public NonLeafPosition(LayoutManager lm, Position sub) {
super(lm);
subPos = sub;
}
private static class BlockBreakPosition extends LeafPosition {
protected BreakPoss breakps;
- protected BlockBreakPosition(LayoutProcessor lm, BreakPoss bp) {
+ protected BlockBreakPosition(LayoutManager lm, BreakPoss bp) {
super(lm, 0);
breakps = bp;
}
*/
public BreakPoss getNextBreakPoss(LayoutContext context) {
- LayoutProcessor curLM ; // currently active LM
+ LayoutManager curLM ; // currently active LM
while ((curLM = getChildLM()) != null) {
BreakPoss bp = null;
public class Position {
- private LayoutProcessor layoutManager;
+ private LayoutManager layoutManager;
- public Position(LayoutProcessor lm) {
+ public Position(LayoutManager lm) {
layoutManager = lm;
}
- public LayoutProcessor getLM() {
+ public LayoutManager getLM() {
return layoutManager;
}
private Iterator parentIter;
private Object nextObj;
- private LayoutProcessor childLM;
+ private LayoutManager childLM;
private boolean bHasNext;
PositionIterator(Iterator pIter) {
//checkNext();
}
- public LayoutProcessor getNextChildLM() {
+ public LayoutManager getNextChildLM() {
// Move to next "segment" of iterator, ie: new childLM
if (childLM == null && nextObj != null) {
childLM = getLM(nextObj);
return childLM;
}
- protected abstract LayoutProcessor getLM(Object nextObj);
+ protected abstract LayoutManager getLM(Object nextObj);
protected abstract Position getPos(Object nextObj);
}
protected boolean checkNext() {
- LayoutProcessor lm = getLM(nextObj);
+ LayoutManager lm = getLM(nextObj);
if (childLM == null) {
childLM = lm;
} else if (childLM != lm) {
* LayoutManager for a block FO.
*/
public class RetrieveMarkerLayoutManager extends AbstractLayoutManager {
- private LayoutProcessor replaceLM = null;
+ private LayoutManager replaceLM = null;
private boolean loaded = false;
private String name;
private int position;
if (marker != null) {
addLMVisitor.addLayoutManager(marker, list);
if (list.size() > 0) {
- replaceLM = (LayoutProcessor)list.get(0);
+ replaceLM = (LayoutManager)list.get(0);
replaceLM.setParent(this);
replaceLM.initialize();
getLogger().debug("retrieved: " + replaceLM + ":" + list.size());
* This returns the current block container area
* and creates it if required.
*
- * @see org.apache.fop.layoutmgr.LayoutProcessor#getParentArea(Area)
+ * @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.LayoutProcessor#addChild(Area)
+ * @see org.apache.fop.layoutmgr.LayoutManager#addChild(Area)
*/
public void addChild(Area childArea) {
parentLM.addChild(childArea);
}
/**
- * @see org.apache.fop.layoutmgr.LayoutProcessor#resetPosition(Position)
+ * @see org.apache.fop.layoutmgr.LayoutManager#resetPosition(Position)
*/
public void resetPosition(Position resetPos) {
loadLM();
}
/**
- * @see org.apache.fop.layoutmgr.LayoutProcessor#getNextBreakPoss(LayoutContext)
+ * @see org.apache.fop.layoutmgr.LayoutManager#getNextBreakPoss(LayoutContext)
*/
public BreakPoss getNextBreakPoss(LayoutContext context) {
// currently active LM
- LayoutProcessor curLM;
+ LayoutManager curLM;
while ((curLM = getChildLM()) != null) {
// Make break positions and return page break
}
/**
- * @see org.apache.fop.layoutmgr.LayoutProcessor#addAreas(PositionIterator, LayoutContext)
+ * @see org.apache.fop.layoutmgr.LayoutManager#addAreas(PositionIterator, LayoutContext)
*/
public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {
- LayoutProcessor childLM;
+ LayoutManager childLM;
int iStartPos = 0;
LayoutContext lc = new LayoutContext(0);
while (parentIter.hasNext()) {
}
/**
- * @see org.apache.fop.layoutmgr.LayoutProcessor#getParentArea(Area)
+ * @see org.apache.fop.layoutmgr.LayoutManager#getParentArea(Area)
*/
public Area getParentArea(Area childArea) {
return region;
import org.apache.fop.fo.PropertyManager;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.LeafPosition;
import org.apache.fop.layoutmgr.BreakPoss;
import org.apache.fop.layoutmgr.LayoutContext;
* @return the next break possibility
*/
public BreakPoss getNextBreakPoss(LayoutContext context) {
- LayoutProcessor curLM; // currently active LM
+ LayoutManager curLM; // currently active LM
MinOptMax stackSize = new MinOptMax();
// if starting add space before
if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
// reset to last break
if (lastPos != null) {
- LayoutProcessor lm = lastPos.getLayoutManager();
+ LayoutManager lm = lastPos.getLayoutManager();
lm.resetPosition(lastPos.getPosition());
if (lm != curLM) {
curLM.resetPosition(null);
getParentArea(null);
addID();
- LayoutProcessor childLM;
+ LayoutManager childLM;
int iStartPos = 0;
LayoutContext lc = new LayoutContext(0);
while (parentIter.hasNext()) {
import org.apache.fop.fo.PropertyManager;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.LeafPosition;
import org.apache.fop.layoutmgr.BreakPoss;
import org.apache.fop.layoutmgr.LayoutContext;
private class SectionPosition extends LeafPosition {
protected List list;
- protected SectionPosition(LayoutProcessor lm, int pos, List l) {
+ protected SectionPosition(LayoutManager lm, int pos, List l) {
super(lm, pos);
list = l;
}
*/
public BreakPoss getNextBreakPoss(LayoutContext context) {
// currently active LM
- LayoutProcessor curLM;
+ LayoutManager curLM;
MinOptMax stackSize = new MinOptMax();
// if starting add space before
// stackSize.add(spaceBefore);
BreakPoss lastPos = null;
- while ((curLM = (LayoutProcessor)getChildLM()) != null) {
+ while ((curLM = (LayoutManager)getChildLM()) != null) {
// Make break positions
// Set up a LayoutContext
int ipd = context.getRefIPD();
if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
// reset to last break
if (lastPos != null) {
- LayoutProcessor lm = lastPos.getLayoutManager();
+ LayoutManager lm = lastPos.getLayoutManager();
lm.resetPosition(lastPos.getPosition());
if (lm != curLM) {
curLM.resetPosition(null);
int listHeight = 0;
- LayoutProcessor childLM;
+ LayoutManager childLM;
int iStartPos = 0;
LayoutContext lc = new LayoutContext(0);
while (parentIter.hasNext()) {
new BreakPossPosIter(bodyBreaks, iStartPos,
lfp.getLeafPos() + 1);
iStartPos = lfp.getLeafPos() + 1;
- while ((childLM = (LayoutProcessor)breakPosIter.getNextChildLM()) != null) {
+ while ((childLM = (LayoutManager)breakPosIter.getNextChildLM()) != null) {
childLM.addAreas(breakPosIter, lc);
}
}
import org.apache.fop.fo.PropertyManager;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.LeafPosition;
import org.apache.fop.layoutmgr.BreakPoss;
import org.apache.fop.layoutmgr.LayoutContext;
private class ItemPosition extends LeafPosition {
protected List cellBreaks;
- protected ItemPosition(LayoutProcessor lm, int pos, List l) {
+ protected ItemPosition(LayoutManager lm, int pos, List l) {
super(lm, pos);
cellBreaks = l;
}
if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
// reset to last break
if (lastPos != null) {
- LayoutProcessor lm = lastPos.getLayoutManager();
+ LayoutManager lm = lastPos.getLayoutManager();
lm.resetPosition(lastPos.getPosition());
if (lm != curLM) {
curLM.resetPosition(null);
package org.apache.fop.layoutmgr.table;
import org.apache.fop.fo.PropertyManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
import org.apache.fop.layoutmgr.LeafPosition;
import org.apache.fop.layoutmgr.BreakPoss;
if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
// reset to last break
if (lastPos != null) {
- LayoutProcessor lm = lastPos.getLayoutManager();
+ LayoutManager lm = lastPos.getLayoutManager();
lm.resetPosition(lastPos.getPosition());
if (lm != curLM) {
curLM.resetPosition(null);
package org.apache.fop.layoutmgr.table;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.LeafPosition;
import org.apache.fop.layoutmgr.BreakPoss;
import org.apache.fop.layoutmgr.LayoutContext;
* @return the next break possibility
*/
public BreakPoss getNextBreakPoss(LayoutContext context) {
- LayoutProcessor curLM; // currently active LM
+ LayoutManager curLM; // currently active LM
MinOptMax stackSize = new MinOptMax();
// if starting add space before
if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
// reset to last break
if (lastPos != null) {
- LayoutProcessor lm = lastPos.getLayoutManager();
+ LayoutManager lm = lastPos.getLayoutManager();
lm.resetPosition(lastPos.getPosition());
if (lm != curLM) {
curLM.resetPosition(null);
getParentArea(null);
addID();
- LayoutProcessor childLM;
+ LayoutManager childLM;
int iStartPos = 0;
LayoutContext lc = new LayoutContext(0);
while (parentIter.hasNext()) {
import org.apache.fop.fo.PropertyManager;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.LeafPosition;
import org.apache.fop.layoutmgr.BreakPoss;
import org.apache.fop.layoutmgr.LayoutContext;
* @return the next break possibility
*/
public BreakPoss getNextBreakPoss(LayoutContext context) {
- LayoutProcessor curLM; // currently active LM
+ LayoutManager curLM; // currently active LM
MinOptMax stackSize = new MinOptMax();
// if starting add space before
if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
// reset to last break
if (lastPos != null) {
- LayoutProcessor lm = lastPos.getLayoutManager();
+ LayoutManager lm = lastPos.getLayoutManager();
lm.resetPosition(lastPos.getPosition());
if (lm != curLM) {
curLM.resetPosition(null);
getParentArea(null);
addID();
- LayoutProcessor childLM;
+ LayoutManager childLM;
int iStartPos = 0;
LayoutContext lc = new LayoutContext(0);
while (parentIter.hasNext()) {
import org.apache.fop.fo.PropertyManager;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.LeafPosition;
import org.apache.fop.layoutmgr.BreakPoss;
import org.apache.fop.layoutmgr.LayoutContext;
private class RowPosition extends LeafPosition {
protected List cellBreaks;
- protected RowPosition(LayoutProcessor lm, int pos, List l) {
+ protected RowPosition(LayoutManager lm, int pos, List l) {
super(lm, pos);
cellBreaks = l;
}
cellList = new ArrayList();
// add cells to list
while (childLMiter.hasNext()) {
- curChildLM = (LayoutProcessor) childLMiter.next();
+ curChildLM = (LayoutManager) childLMiter.next();
curChildLM.setUserAgent(getUserAgent());
curChildLM.setParent(this);
curChildLM.initialize();
* @return the next break possibility
*/
public BreakPoss getNextBreakPoss(LayoutContext context) {
- LayoutProcessor curLM; // currently active LM
+ LayoutManager curLM; // currently active LM
BreakPoss lastPos = null;
List breakList = new ArrayList();
if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
// reset to last break
if (lastPos != null) {
- LayoutProcessor lm = lastPos.getLayoutManager();
+ LayoutManager lm = lastPos.getLayoutManager();
lm.resetPosition(lastPos.getPosition());
if (lm != curLM) {
curLM.resetPosition(null);
* If pos is null, then back up to the first child LM.
*/
protected void reset(Position pos) {
- LayoutProcessor curLM; // currently active LM
+ LayoutManager curLM; // currently active LM
int cellcount = 0;
if (pos == null) {
package org.apache.fop.layoutmgr.table;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.LeafPosition;
import org.apache.fop.layoutmgr.BreakPoss;
import org.apache.fop.layoutmgr.LayoutContext;
* @return the next break possibility
*/
public BreakPoss getNextBreakPoss(LayoutContext context) {
- LayoutProcessor curLM; // currently active LM
+ LayoutManager curLM; // currently active LM
MinOptMax stackSize = new MinOptMax();
// if starting add space before
if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
// reset to last break
if (lastPos != null) {
- LayoutProcessor lm = lastPos.getLayoutManager();
+ LayoutManager lm = lastPos.getLayoutManager();
lm.resetPosition(lastPos.getPosition());
if (lm != curLM) {
curLM.resetPosition(null);
getParentArea(null);
addID();
- LayoutProcessor childLM;
+ LayoutManager childLM;
int iStartPos = 0;
LayoutContext lc = new LayoutContext(0);
while (parentIter.hasNext()) {
import org.apache.fop.fo.PropertyManager;
import org.apache.fop.fo.properties.TableColLength;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.LeafPosition;
import org.apache.fop.layoutmgr.BreakPoss;
import org.apache.fop.layoutmgr.LayoutContext;
private class SectionPosition extends LeafPosition {
protected List list;
- protected SectionPosition(LayoutProcessor lm, int pos, List l) {
+ protected SectionPosition(LayoutManager lm, int pos, List l) {
super(lm, pos);
list = l;
}
if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
// reset to last break
if (lastPos != null) {
- LayoutProcessor lm = lastPos.getLayoutManager();
+ LayoutManager lm = lastPos.getLayoutManager();
lm.resetPosition(lastPos.getPosition());
if (lm != curLM) {
curLM.resetPosition(null);