From: Erik V. <eri...@hc...> - 2005-04-19 19:52:37
|
Brett, > > In my stockmarket servlet the code is like > > > > for (row = 0; row < stockMarket.getNumberOfRows(); row++) { > > for (col = 0; col < > stockMarket.getNumberOfColumns(); col++) > > { > > square = stockMarket.getStockSpace(row, col); > > if (square != null) { > > // draw square > > iterator = > square.getTokens().iterator(); > > while (iterator.hasNext()) { > > company = (PublicCompany) > > iterator.next(); > > // draw company marker > > } > > } > > } > > } > > > > and I don't see why similar code would not work for you. > > I guess I'm missing a point somewhere.... > > > > Hmmm... can you compare this with my swing version and see if > I'm making > the problem harder than it needs to be? I think you are almost there. I have checked in: - a new version of test.StockTest that adds some markers to the stock chart by setting par prices, and - a new version of ui.StockChart with some (temporary) System.out prints to demonstrate that these markers are indeed picked up by your current code. All you need to do, it seems to me, is to let the markers display themselves on the right place (I can't help much with that at the moment....) BTW I have also added a few more missing I's to StockSpace and Company. And locally I have removed Little, Big and Simple Company, which I think are redundant now, but I keep these ones merged by CVS. Do you want to keep these? Erik. |