From: brett l. <wak...@gm...> - 2006-04-18 00:05:52
|
On 4/17/06, Erik Vos <eri...@hc...> wrote: > > It's been a while, but over the Easter weekend I've finally > managed to do some work on our beloved project. > YAY! :-) > I had planned to start with some new functionality, but in an > initial test to see where we are I found quite some bugs in the OR GUI. Yeah, many of these are my fault and were introduced in the reorganization of the OR classes. > One culprit was the ORPanel custom repaint() method, > which wiped out everything just written to the grid. > I have renamed this method to recreate(), and it is now only called > at an OR change. revalidate() now does the repainting job after each acti= on. I'd been working on fixing this. However, my preferred solution was to store this information in model objects, and then have repaint() pull the information from the model. Right now, using observables, this data isn't stored anywhere but in the UI= . > I have tried to streamline the interactions between the various OR > components > such that the whole is a bit more robust now. But no guarantees. > So far it has more than once turned out that such attempts have made > things worse rather than better.... > I've poked a little at the new code, it seems to restore everything to working order. So far, I've found no major issues. > The improvements include: > > - The most recent revenue figure is now remembered and displayed > across OR's. For this, I have created a new MoneyModel class, into > which I also expect to merge some other money-related granular "model" > classes later. > Good, this will help in developing end-game stats. > - The Stock chart squares are now separate objects (new class GUIStockSpa= ce) > which observe the model's StockSpace changes. The whole stock chart > is now no longer completely recreated at each share action, as it was > before. > Just the affected squares are redrawn. Excellent. I knew this would be necessary... > > - After the above change the overlapping part between StatusWindow > and StockChart still showed the annoying flickering. This turned out > to be caused by the setVisible(true) call for the Stock Chart after > each action in the StatusWindow. I have changed this so that setVisible > for any window is now only called at the start of a new round. > > It seems to me, that the GUI is now in a somewhat better shape, > although still far from perfect. > IMO, it's looking good. I don't think we're missing any important data that the user should see. I still need to double-check the end-game code and see if we handle that correctly. If that works, I'll see about bundling up a JAR for wider consumption/testing. ----Brett. |