if (value instanceof ReportDrawable)
{
// A report drawable element receives some context information as well.
final ReportDrawable reportDrawable = (ReportDrawable) value;
final ProcessingContext processingContext = runtime.getProcessingContext();
reportDrawable.setConfiguration(processingContext.getConfiguration());
reportDrawable.setResourceBundleFactory(processingContext.getResourceBundleFactory());
processReportDrawableContent(reportDrawable, parentRenderBox, element, stateKey);
}
else if (value instanceof Anchor)
{
DefaultLayoutBuilder.logger.warn
("The use of anchor-objects is deprecated and will be removed from future reports. " +
"Update your report definition.");
processAnchor((Anchor) value, parentRenderBox, element, stateKey);
}
else
{
final DataSource dataSource = element.getElementType();
final Object rawValue;
if (dataSource instanceof RawDataSource)
{
final RawDataSource rds = (RawDataSource) dataSource;
rawValue = rds.getRawValue(runtime, element);
}
else
{
rawValue = null;
}
// String is final, so it is safe to do this ...
if (DefaultLayoutBuilder.STRING_CLASSNAME.equals(value.getClass().getName()))
{
processText(value, rawValue, parentRenderBox, element, stateKey);
}
else if (value instanceof Shape)
{
final Shape shape = (Shape) value;
final ReportDrawable reportDrawable = new ShapeDrawable
(shape, element.getStyle().getBooleanStyleProperty(ElementStyleKeys.KEEP_ASPECT_RATIO));
final ProcessingContext processingContext = runtime.getProcessingContext();
reportDrawable.setConfiguration(processingContext.getConfiguration());
reportDrawable.setResourceBundleFactory(processingContext.getResourceBundleFactory());
processReportDrawableContent(reportDrawable, parentRenderBox, element, stateKey);
}
else if (value instanceof ImageContainer ||
value instanceof DrawableWrapper)
{