return;
}
breakState.add(new EndSequenceElement(inlineRenderBox));
final ParagraphRenderBox paragraph = breakState.getParagraph();
final CSSValue lastLineAlignment = paragraph.getLastLineAlignment();
final CSSValue textAlignment = paragraph.getTextAlignment();
// Todo: Start the layouting on primary sequence ...
// This aligns all direct childs. Once that is finished, we have to
// check, whether possibly existing inner-paragraphs are still valid
// or whether moving them violated any of the inner-pagebreak constraints.
final TextAlignmentProcessor processor = create(textAlignment, lastLineAlignment);
final InlineSequenceElement[] sequence = breakState.getSequence();
if (sequence.length == 0)
{
return;
}
final long lineStart = paragraph.getContentAreaX1();
final long lineEnd = paragraph.getContentAreaX2();
if (lineEnd - lineStart <= 0)
{
final long minimumChunkWidth = paragraph.getMinimumChunkWidth();
processor.initialize(sequence,
lineStart, lineStart + minimumChunkWidth, pageGrid);
Log.warn("Auto-Corrected zero-width linebox.");
}
else
{
processor.initialize(sequence, lineStart, lineEnd, pageGrid);
}
while (processor.hasNext())
{
final RenderNode linebox = processor.next();
if (linebox instanceof ParagraphPoolBox == false)
{
throw new NullPointerException("Line must not be null");
}
paragraph.addGeneratedChild(linebox);
}
}