I currently use timers to update all GUI components so that they change to reflect the underlying data model. This isn’t just for level meters or things that need updating at high FPS, but also for knobs and sliders and other things that rarely change. The timer update calls are wasteful but have worked ok until now. I now have a HashMap container (but I’d be happy to use whatever container makes my life easiest) in the underlying data model and a table component in the UI that reflects the stored data. I would like the UI table to update when the underlying data changes, but using the timer method to repaint the table as it grows is beginning to smell really fishy.
I’m guessing that the data should sense when it has been changed and fire an event off to the UI components somehow. However, the best way to do this is a bit of a mystery to me.
Any clarification, hints, or tricks would be great to hear and thanks for taking the time to read this post.