return false;
}
}
if (paragraphBox.isComplexParagraph())
{
final ParagraphLinebreaker item = new FullLinebreaker(paragraphBox);
paragraphNesting.push(item);
breakState = item;
}
else
{
if (reusableSimpleLinebreaker == null)
{
reusableSimpleLinebreaker = new SimpleLinebreaker(paragraphBox);
}
else
{
reusableSimpleLinebreaker.recycle(paragraphBox);
}
paragraphNesting.push(reusableSimpleLinebreaker);
breakState = reusableSimpleLinebreaker;
}
return true;
}
// The breakState indicates that there is a paragraph processing active at the moment. This means, the
// paragraph-box we are dealing with right now is a nested box.
if (breakState.isWritable() == false)
{
// OK, should not happen, but you never know. I'm good at hiding
// bugs in the code ..
throw new IllegalStateException("A child cannot be dirty, if the parent is clean");
}
// The paragraph is somehow nested in an other paragraph.
// This cannot be handled by the simple implementation, as we will most likely start to deriveForAdvance childs sooner
// or later
if (breakState instanceof FullLinebreaker == false)
{
// convert it ..
final FullLinebreaker fullBreaker = breakState.startComplexLayout();
paragraphNesting.pop();
paragraphNesting.push(fullBreaker);
breakState = fullBreaker;
}