}
});
for (final Iterator<Paintable> i = paintables.iterator(); i
.hasNext();) {
final Paintable p = i.next();
// TODO CLEAN
if (p instanceof Window) {
final Window w = (Window) p;
if (w.getTerminal() == null) {
w.setTerminal(application.getMainWindow()
.getTerminal());
}
}
/*
* This does not seem to happen in tk5, but remember this
* case: else if (p instanceof Component) { if (((Component)
* p).getParent() == null || ((Component)
* p).getApplication() == null) { // Component requested
* repaint, but is no // longer attached: skip
* paintablePainted(p); continue; } }
*/
// TODO we may still get changes that have been
// rendered already (changes with only cached flag)
if (paintTarget.needsToBePainted(p)) {
paintTarget.startTag("change");
paintTarget.addAttribute("format", "uidl");
final String pid = getPaintableId(p);
paintTarget.addAttribute("pid", pid);
p.paint(paintTarget);
paintTarget.endTag("change");
}
paintablePainted(p);