diff options
author | Keiron Liddle <keiron@apache.org> | 2002-06-18 11:27:36 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2002-06-18 11:27:36 +0000 |
commit | f8dd11e5548f4b8e8b596cd46585e83d095a46cc (patch) | |
tree | 2920060defb0c6e287615918b29f34ba95fba5fc /src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java | |
parent | d6eff2ec31461b6f96900e391e7e053aa641757d (diff) | |
download | xmlgraphics-fop-f8dd11e5548f4b8e8b596cd46585e83d095a46cc.tar.gz xmlgraphics-fop-f8dd11e5548f4b8e8b596cd46585e83d095a46cc.zip |
ttempt to fix add inline objects and fix some probs
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194895 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java')
-rw-r--r-- | src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java b/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java index c97f85855..fd834356d 100644 --- a/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java @@ -9,6 +9,7 @@ package org.apache.fop.layoutmgr; import org.apache.fop.fo.FObj; import org.apache.fop.area.Area; +import org.apache.fop.area.MinOptMax; import org.apache.fop.area.inline.InlineArea; @@ -17,7 +18,7 @@ import org.apache.fop.area.inline.InlineArea; * These are all inline objects. Most of them cannot be split (Text is * an exception to this rule.) */ -public class LeafNodeLayoutManager extends AbstractLayoutManager { +public class LeafNodeLayoutManager extends AbstractBPLayoutManager { private InlineArea curArea = null; @@ -68,5 +69,28 @@ public class LeafNodeLayoutManager extends AbstractLayoutManager { return null; } + public BreakPoss getNextBreakPoss(LayoutContext context, + Position prevBreakPoss) { + curArea = get(0); + if(curArea == null) { + setFinished(true); + return null; + } + BreakPoss bp = new BreakPoss(new LeafPosition(this, 0), BreakPoss.CAN_BREAK_AFTER | BreakPoss.CAN_BREAK_BEFORE | BreakPoss.ISFIRST | BreakPoss.ISLAST | BreakPoss.REST_ARE_SUPPRESS_AT_LB); + bp.setStackingSize(curArea.getAllocationIPD()); + setFinished(true); + return bp; + } + + public void addAreas(PositionIterator posIter, LayoutContext context) { + parentLM.addChild(curArea); + while(posIter.hasNext()) { + posIter.next(); + } + } + public boolean canBreakBefore(LayoutContext context) { + return true; + } } + |