More Thinking About Item Renderers

Well, the last post definitely got people thinking. Since then I’ve seen a few of you struggle with images, centering, etc. Again, if you’re in a hurry, take a container and center an Image in it, but just be aware that that is kind of heavy.
This example shows how I would do it in order to optimize on performance. Most drop-in renderers like Image and CheckBox are comprised of child components that actually display the content, text and icons. By overriding the updateDisplayList methods, you can center the content without the cost of wrapping the renderer in a container.
Download Source Code
Run Demo
This example also shows how to use labelFunction to map fields in your data to external or embedded images. The usual caveats and disclaimers apply.
-Alex