Class ComputeMarginsStep
- java.lang.Object
-
- org.jfree.layouting.renderer.process.IterateVisualProcessStep
-
- org.jfree.layouting.renderer.process.ComputeMarginsStep
-
public class ComputeMarginsStep extends IterateVisualProcessStep
This semi-dynamic step computes the effective margins. It requires that the model is fully computed and that all structural errors have been resolved. Computing the effective margins is a recursive computation. It depends on the already evaluated effective margin of the parent (for top margins), the predecessor and parent (for left) and the last child (for bottom and right margins). Todo: Some better change management. Right now everything is recomputed all the time. Margins eat 10% of the total time ..- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description ComputeMarginsStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compute(LogicalPageBox root)
protected void
finishBlockLevelBox(RenderBox box)
On our way out, compute the bottom and right margins as well.protected void
processParagraphChilds(ParagraphRenderBox box)
protected boolean
startBlockLevelBox(RenderBox box)
This computes the top and left margin.-
Methods inherited from class org.jfree.layouting.renderer.process.IterateVisualProcessStep
finishInlineLevelBox, processBlockLevelChild, processBlockLevelNode, processBoxChilds, processFlow, processInlineLevelChild, processInlineLevelNode, processOtherLevelChild, startInlineLevelBox, startProcessing
-
-
-
-
Method Detail
-
compute
public void compute(LogicalPageBox root)
-
processParagraphChilds
protected void processParagraphChilds(ParagraphRenderBox box)
- Specified by:
processParagraphChilds
in classIterateVisualProcessStep
-
startBlockLevelBox
protected boolean startBlockLevelBox(RenderBox box)
This computes the top and left margin. The effective margin is always zero, if the box has no parent at all.- Overrides:
startBlockLevelBox
in classIterateVisualProcessStep
- Parameters:
box
-
-
finishBlockLevelBox
protected void finishBlockLevelBox(RenderBox box)
On our way out, compute the bottom and right margins as well.- Overrides:
finishBlockLevelBox
in classIterateVisualProcessStep
- Parameters:
box
-
-
-