Class ParagraphLineBreakStep
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.layout.process.IterateStructuralProcessStep
-
- org.pentaho.reporting.engine.classic.core.layout.process.ParagraphLineBreakStep
-
public final class ParagraphLineBreakStep extends IterateStructuralProcessStep
This static computation step performs manual linebreaks on all paragraphs. This transforms the pool-collection into the lines-collection. For now, we follow a very simple path: A paragraph cannot be validated, if it is not yet closed. The linebreaking, be it the static one here or the dynamic one later, must be redone when the paragraph changes. Splitting for linebreaks happens only between inline-boxes. BlockBoxes that are contained in inline-boxes (like 'inline-block' elements or 'inline-tables') are considered unbreakable according to the CSS specs. Linebreaking can be suspended in these cases. As paragraphs itself are block elements, the linebreaks can be done iterative, using a simple stack to store the context of possibly nested paragraphs. The paragraph's pool contains the elements that should be processed, and the line-container will receive the pool's content (contained in an artificial inline element, as the linecontainer is a block-level element). Change-tracking should take place on the paragraph's pool element instead of the paragraph itself. This way, only structural changes are taken into account.- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description ParagraphLineBreakStep()
-
Method Summary
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.layout.process.IterateStructuralProcessStep
finishTableColumnGroupBox, processBoxChilds, processTableColumn, startProcessing
-
-
-
-
Method Detail
-
compute
public void compute(LogicalPageBox root)
-
processParagraphChilds
protected void processParagraphChilds(ParagraphRenderBox box)
- Overrides:
processParagraphChilds
in classIterateStructuralProcessStep
-
processRenderableContent
protected void processRenderableContent(RenderableReplacedContentBox box)
- Overrides:
processRenderableContent
in classIterateStructuralProcessStep
-
startBlockBox
protected boolean startBlockBox(BlockRenderBox box)
- Overrides:
startBlockBox
in classIterateStructuralProcessStep
-
finishBlockBox
protected void finishBlockBox(BlockRenderBox box)
- Overrides:
finishBlockBox
in classIterateStructuralProcessStep
-
startCanvasBox
protected boolean startCanvasBox(CanvasRenderBox box)
- Overrides:
startCanvasBox
in classIterateStructuralProcessStep
-
finishCanvasBox
protected void finishCanvasBox(CanvasRenderBox box)
- Overrides:
finishCanvasBox
in classIterateStructuralProcessStep
-
startInlineBox
protected boolean startInlineBox(InlineRenderBox box)
- Overrides:
startInlineBox
in classIterateStructuralProcessStep
-
finishInlineBox
protected void finishInlineBox(InlineRenderBox box)
- Overrides:
finishInlineBox
in classIterateStructuralProcessStep
-
startRowBox
protected boolean startRowBox(RenderBox box)
- Overrides:
startRowBox
in classIterateStructuralProcessStep
-
finishRowBox
protected void finishRowBox(RenderBox box)
- Overrides:
finishRowBox
in classIterateStructuralProcessStep
-
startTableRowBox
protected boolean startTableRowBox(TableRowRenderBox box)
- Overrides:
startTableRowBox
in classIterateStructuralProcessStep
-
finishTableRowBox
protected void finishTableRowBox(TableRowRenderBox box)
- Overrides:
finishTableRowBox
in classIterateStructuralProcessStep
-
startTableSectionBox
protected boolean startTableSectionBox(TableSectionRenderBox box)
- Overrides:
startTableSectionBox
in classIterateStructuralProcessStep
-
finishTableSectionBox
protected void finishTableSectionBox(TableSectionRenderBox box)
- Overrides:
finishTableSectionBox
in classIterateStructuralProcessStep
-
startAutoBox
protected boolean startAutoBox(RenderBox box)
- Overrides:
startAutoBox
in classIterateStructuralProcessStep
-
finishAutoBox
protected void finishAutoBox(RenderBox box)
- Overrides:
finishAutoBox
in classIterateStructuralProcessStep
-
processOtherNode
protected void processOtherNode(RenderNode node)
- Overrides:
processOtherNode
in classIterateStructuralProcessStep
-
startOtherBox
protected boolean startOtherBox(RenderBox box)
- Overrides:
startOtherBox
in classIterateStructuralProcessStep
-
finishOtherBox
protected void finishOtherBox(RenderBox box)
- Overrides:
finishOtherBox
in classIterateStructuralProcessStep
-
startTableCellBox
protected boolean startTableCellBox(TableCellRenderBox box)
- Overrides:
startTableCellBox
in classIterateStructuralProcessStep
-
finishTableCellBox
protected void finishTableCellBox(TableCellRenderBox box)
- Overrides:
finishTableCellBox
in classIterateStructuralProcessStep
-
startTableColumnGroupBox
protected boolean startTableColumnGroupBox(TableColumnGroupNode box)
- Overrides:
startTableColumnGroupBox
in classIterateStructuralProcessStep
-
startTableBox
protected boolean startTableBox(TableRenderBox box)
- Overrides:
startTableBox
in classIterateStructuralProcessStep
-
finishTableBox
protected void finishTableBox(TableRenderBox box)
- Overrides:
finishTableBox
in classIterateStructuralProcessStep
-
-