]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Minor fixups: remove redundant null check, remove redundant initial assignment +...
authorAndreas L. Delmelle <adelmelle@apache.org>
Thu, 26 Nov 2015 20:41:24 +0000 (20:41 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Thu, 26 Nov 2015 20:41:24 +0000 (20:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1716765 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/FloatContentLayoutManager.java

index 06e1484cf084720bbb1eee9d02fc3facc7cc68f4..6c66646b0af3709c2a1430857b2f00995eb4970b 100644 (file)
@@ -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;
     }
 }