@Override
public void paintContent(PaintTarget target) throws PaintException {
super.paintContent(target);
int paintedComponents = 0;
for (int i = 0; i < components.length; i++) {
Component c = components[i];
if (c.isAttached()) {
target.addAttribute("component" + paintedComponents++, c);
} else {
Logger.getLogger(SourceIs.class.getName())
.log(Level.WARNING,
"SourceIs component {0} at index {1} is not attached to the component hierachy and will thus be ignored",
new Object[] { c.getClass().getName(),
Integer.valueOf(i) });
}
}
target.addAttribute("c", paintedComponents);
}