diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2015-11-26 20:41:24 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2015-11-26 20:41:24 +0000 |
commit | bd129ada80e16c95106585181de31846127034c2 (patch) | |
tree | 95fc1b063c1d717ead8ac01d077deb3bcb8fb54b /src/java/org/apache | |
parent | ff9fc9454ed9c1b8ca930b206a1a90f227639b4b (diff) | |
download | xmlgraphics-fop-bd129ada80e16c95106585181de31846127034c2.tar.gz xmlgraphics-fop-bd129ada80e16c95106585181de31846127034c2.zip |
Minor fixups: remove redundant null check, remove redundant initial assignment + start of javadoc fixups
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1716765 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/FloatContentLayoutManager.java | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/FloatContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/FloatContentLayoutManager.java index 06e1484cf..6c66646b0 100644 --- a/src/java/org/apache/fop/layoutmgr/FloatContentLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/FloatContentLayoutManager.java @@ -38,30 +38,40 @@ public class FloatContentLayoutManager extends SpacedBorderedPaddedBlockLayoutMa private int side; private int yOffset; + /** + * {@asf.todo - Add info} + * + * @param node the {@link Float} associated with this instance + */ public FloatContentLayoutManager(Float node) { super(node); generatesReferenceArea = true; side = node.getFloat(); } + @Override public Keep getKeepTogether() { return getParentKeepTogether(); } + @Override public Keep getKeepWithNext() { return Keep.KEEP_AUTO; } + @Override public Keep getKeepWithPrevious() { return Keep.KEEP_ALWAYS; } + @Override public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) { floatContentArea = new SideFloat(); AreaAdditionUtil.addAreas(this, parentIter, layoutContext); flush(); } + @Override public void addChildArea(Area childArea) { floatContentArea.addChildArea(childArea); floatContentArea.setBPD(childArea.getAllocBPD()); @@ -89,6 +99,14 @@ public class FloatContentLayoutManager extends SpacedBorderedPaddedBlockLayoutMa } } + /** + * {@asf.todo - Add info} + * + * @param elemenList + * @param startIndex + * @param endIndex + * @return + */ public static List<FloatContentLayoutManager> checkForFloats(List<ListElement> elemenList, int startIndex, int endIndex) { ListIterator<ListElement> iter = elemenList.listIterator(startIndex); @@ -108,10 +126,16 @@ public class FloatContentLayoutManager extends SpacedBorderedPaddedBlockLayoutMa } } + @Override protected CommonBorderPaddingBackground getCommonBorderPaddingBackground() { return null; } + /** + * {@asf.todo - Add info} + * + * @param layoutContext + */ public void processAreas(LayoutContext layoutContext) { if (getParent() instanceof FloatLayoutManager) { FloatLayoutManager flm = (FloatLayoutManager) getParent(); @@ -119,23 +143,27 @@ public class FloatContentLayoutManager extends SpacedBorderedPaddedBlockLayoutMa } } + /** + * @return the height of the float content area + */ public int getFloatHeight() { return floatContentArea.getAllocBPD(); } + /** + * @return the y-offset of the float content + */ public int getFloatYOffset() { return yOffset; } private int getStartIndent() { - int startIndent = 0; + int startIndent; LayoutManager lm = getParent(); while (!(lm instanceof BlockLayoutManager)) { lm = lm.getParent(); } - if (lm != null) { - startIndent = ((BlockLayoutManager) lm).startIndent; - } + startIndent = ((BlockLayoutManager) lm).startIndent; return startIndent; } } |