drawDrawable(content, g2, d);
}
else if (o instanceof LocalImageContainer)
{
final LocalImageContainer imageContainer = (LocalImageContainer) o;
final Image image = imageContainer.getImage();
drawImage(content, image);
}
else if (o instanceof URLImageContainer)
{
final URLImageContainer imageContainer = (URLImageContainer) o;
if (imageContainer.isLoadable() == false)
{
LogicalPageDrawable.logger.info("URL-image cannot be rendered, as it was declared to be not loadable.");
return;
}
final ResourceKey sourceURL = imageContainer.getResourceKey();
if (sourceURL == null)
{
LogicalPageDrawable.logger.info("URL-image cannot be rendered, as it did not return a valid URL.");
}
try
{
final Resource resource = resourceManager.create(sourceURL, null, Image.class);
final Image image = (Image) resource.getResource();
drawImage(content, image);
}
catch (ResourceException e)
{
LogicalPageDrawable.logger.info("URL-image cannot be rendered, as the image was not loadable.", e);