diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2011-02-06 01:23:08 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2011-02-06 01:23:08 +0000 |
commit | db0fea16dea5465d25e1e45ecdc276166f9d9c45 (patch) | |
tree | 2e720e4d46758644f21c25ef33be8d8cdd7aa7fb /src/java/org/apache/fop | |
parent | d2d04b82a13aa73cd13c06ddc8f16b00de2b7c18 (diff) | |
download | xmlgraphics-fop-db0fea16dea5465d25e1e45ecdc276166f9d9c45.tar.gz xmlgraphics-fop-db0fea16dea5465d25e1e45ecdc276166f9d9c45.zip |
Code cleanup (minor)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1067569 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/FootnoteBodyLayoutManager.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/FootnoteBodyLayoutManager.java b/src/java/org/apache/fop/layoutmgr/FootnoteBodyLayoutManager.java index 4f6cfa9d5..6c6462a3f 100644 --- a/src/java/org/apache/fop/layoutmgr/FootnoteBodyLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/FootnoteBodyLayoutManager.java @@ -38,31 +38,29 @@ public class FootnoteBodyLayoutManager extends BlockStackingLayoutManager { } /** {@inheritDoc} */ + @Override public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) { - LayoutManager childLM = null; + LayoutManager childLM; LayoutManager lastLM = null; LayoutContext lc = new LayoutContext(0); // "unwrap" the NonLeafPositions stored in parentIter // and put them in a new list; - LinkedList positionList = new LinkedList(); + LinkedList<Position> positionList = new LinkedList<Position>(); Position pos; while (parentIter.hasNext()) { - pos = (Position) parentIter.next(); - //log.trace("pos = " + pos.getClass().getName() + "; " + pos); - Position innerPosition = pos; + pos = parentIter.next(); + Position innerPosition; if (pos instanceof NonLeafPosition) { - innerPosition = ((NonLeafPosition) pos).getPosition(); + innerPosition = pos.getPosition(); if (innerPosition.getLM() == this) { // pos was created by this LM and was inside a penalty // allowing or forbidding a page break // nothing to do - //log.trace(" penalty"); } else { // innerPosition was created by another LM positionList.add(innerPosition); lastLM = innerPosition.getLM(); - //log.trace(" " + innerPosition.getClass().getName()); } } } @@ -81,6 +79,7 @@ public class FootnoteBodyLayoutManager extends BlockStackingLayoutManager { } /** {@inheritDoc} */ + @Override public void addChildArea(Area childArea) { childArea.setAreaClass(Area.CLASS_FOOTNOTE); parentLayoutManager.addChildArea(childArea); @@ -92,16 +91,19 @@ public class FootnoteBodyLayoutManager extends BlockStackingLayoutManager { } /** {@inheritDoc} */ + @Override public Keep getKeepTogether() { return getParentKeepTogether(); } /** {@inheritDoc} */ + @Override public Keep getKeepWithNext() { return Keep.KEEP_AUTO; } /** {@inheritDoc} */ + @Override public Keep getKeepWithPrevious() { return Keep.KEEP_AUTO; } |