### org.jfree.layouting.renderer.process

# Class ParagraphLineBreakStep

- `java.lang.Object`
- - `org.jfree.layouting.renderer.process.IterateStructuralProcessStep`
  - - `org.jfree.layouting.renderer.process.ParagraphLineBreakStep`

`public 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

  `ParagraphLineBreakStep()`

  ## Method Summary

  `void`

  `compute(LogicalPageBox root)`

  `protected void`

  `finishBlockBox(BlockRenderBox box)`

  `protected void`

  `finishInlineBox(InlineRenderBox box)`

  `protected void`

  `finishOtherBox(RenderBox box)`

  `protected boolean`

  `startBlockBox(BlockRenderBox box)`

  `protected boolean`

  `startInlineBox(InlineRenderBox box)`

  `protected boolean`

  `startOtherBox(RenderBox box)`

  `protected void`

  `startOtherNode(RenderNode node)`

  ### Methods inherited from class org.jfree.layouting.renderer.process.IterateStructuralProcessStep

  `finishBlockBox`, `finishInlineBox`, `finishNormalFlow`, `finishOtherBox`, `finishOtherNode`, `processBoxChilds`, `processParagraphChilds`, `startBlockBox`, `startInlineBox`, `startNormalFlow`, `startOtherBox`, `startOtherNode`, `startProcessing`

## Constructor Details

### ParagraphLineBreakStep

    public ParagraphLineBreakStep()

## Method Details

### compute

    public void compute(LogicalPageBox root)

### finishBlockBox

    protected void finishBlockBox(BlockRenderBox box)

> Overrides:
>   finishBlockBox in interface IterateStructuralProcessStep

### finishInlineBox

    protected void finishInlineBox(InlineRenderBox box)

> Overrides:
>   finishInlineBox in interface IterateStructuralProcessStep

### finishOtherBox

    protected void finishOtherBox(RenderBox box)

> Overrides:
>   finishOtherBox in interface IterateStructuralProcessStep

### startBlockBox

    protected boolean startBlockBox(BlockRenderBox box)

> Overrides:
>   startBlockBox in interface IterateStructuralProcessStep

### startInlineBox

    protected boolean startInlineBox(InlineRenderBox box)

> Overrides:
>   startInlineBox in interface IterateStructuralProcessStep

### startOtherBox

    protected boolean startOtherBox(RenderBox box)

> Overrides:
>   startOtherBox in interface IterateStructuralProcessStep

### startOtherNode

    protected void startOtherNode(RenderNode node)

> Overrides:
>   startOtherNode in interface IterateStructuralProcessStep