I'm just getting started on custom components, and have two applications in mind: 1) a board game 2) a diagram editor (or even a page-layout app)
I'm looking for resources and guidance, and aiming for a nice object-oriented design with clear model-view separation. In both cases, I figured that the elements (board tiles or diagram elements) should be lightweight (i.e. Sprites rather than UIComponents) and I would be doing layout myself. In the case of the diagram editor, I would eventually want to support models with large numbers of elements, and be able to exclude invisible elements from the display list, or at least not render them. I've seen various examples of using the Graphics class methods directly, and some that create custom Sprites. I've explored the UIComponent overrides (commitProperties, updateDisplayList etc). But things aren't quite clicking yet. How best to update view from model? (eg. set a property vs listen for custom events) How best to manage the display list? eg. Whether to construct the Sprites in commitProperties, updateDisplayList, somewhere else or not at all. I've seen references to SpringGraph, and should spend more time looking at its implementation. Any other pointers? Thanks in advance.
