if (textElement.isLeaf())
{
final int endOffset = textElement.getEndOffset();
final int startOffset = textElement.getStartOffset();
final String text = textElement.getDocument().getText(startOffset, endOffset - startOffset);
final Element result = new Element();
result.setElementType(LabelType.INSTANCE);
result.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, text);
configureStyle(textElement.getAttributes(), result);
return result;
}
final Band band = new Band();
configureStyle(textElement.getAttributes(), band);
configureBand(textElement, band);
final int size = textElement.getElementCount();
for (int i = 0; i < size; i++)
{
final Element element = process(textElement.getElement(i));
band.addElement(element);
}
return band;
}