final ReportStateKey stateKey)
{
final StyleKey styleKey = ElementStyleKeys.PADDING_LEFT;
if ((parentBox.getNodeType() & LayoutNodeTypes.MASK_BOX_INLINE) == LayoutNodeTypes.MASK_BOX_INLINE)
{
final StyleSheet styleSheet = bandCache.getStyleSheet(elementStyle);
final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
final InlineRenderBox autoParagraphBox =
new InlineRenderBox(styleSheet, element.getObjectID(), boxDefinition,
element.getElementType(), element.getAttributes(), stateKey);
autoParagraphBox.setName(element.getName());
autoParagraphBox.getBoxDefinition().setPreferredWidth(RenderLength.AUTO);
autoParagraphBox.addChilds(renderNodes);
autoParagraphBox.addChilds(finishNodes);
autoParagraphBox.close();
final Object property = styleSheet.getStyleProperty(styleKey);
parentBox.addChild(autoParagraphBox);
}
else
{
final StyleSheet styleSheet = bandCache.getStyleSheet(elementStyle);
final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
final ParagraphRenderBox autoParagraphBox = new ParagraphRenderBox
(styleSheet, element.getObjectID(), boxDefinition, element.getElementType(), element.getAttributes(),
stateKey);
autoParagraphBox.setRawValue(rawValue);
autoParagraphBox.setName(element.getName());
autoParagraphBox.getBoxDefinition().setPreferredWidth(RenderLength.AUTO);
autoParagraphBox.addChilds(renderNodes);
autoParagraphBox.addChilds(finishNodes);
autoParagraphBox.close();
final Object property = styleSheet.getStyleProperty(styleKey);
parentBox.addChild(autoParagraphBox);
}
}