Ignoring UI updates


#1

Hi everybody,

I have a UI that gets a lot of “update” messages - to update layout of sub-components, redrawing them, executing paint() and paintOverChildren(). The result is a sort of “flickering” UI, where the components seem nervous and shaky. What I need, is some way to make the highest level component ignore commands to update all it’s children and painting itself. Is that possible, and does it make sense?

The way my system is built makes it hard for me to rethink the logic behind updating the UI, and the order in which subcomponents are refreshed…

Thanks in advance!

-A


#2

Sounds like a fundamentally bad design to me, I’m afraid!..

Using an ASyncUpdater might help, or a ChangeBroadcaster. Both will let you batch together mutliple change events.


#3

Yeah maybe… It’s based on the State/Observer pattern, so it’s a matter of taste really.

A good suggestion, but this would violate the entire systems basic design (S/O). Oh well… It’s only in a small subset of the system the components act up, so I’ll either deal or live with it. Thanks for the suggestion though, I’ll keep it in mind for future designs :wink:

-A


#4

But the ChangeBroadcaster is designed to do state/observer patterns, unless I’m misunderstanding what you mean by state/observer…


#5