Re: [Figleaf-developer] Need for a ViewRegistry
Status: Alpha
Brought to you by:
steckman
|
From: <sam...@ma...> - 2004-07-05 15:17:33
|
Quoting Greg Steckman <ste...@on...>: > sam...@ma... wrote: > > >Playing around with your SwingViewer last night, I had some problems getting > my > >registered views to be picked up. I think this is down to the fact that I > didn't > >register specific classes with views - that is I registered Informative not > my > >applications ImageAlbum class. I think we could do with defining a > ViewRegistry > >class which could be used with any viewing mechanism. It would define the > >following methods: > > <snip> > The implementation is already written to do precisely this. It first > traverses the complete class hierarchy, if none found it then traverses > the interface hierarchy in a way to try and find the closest > superinterface (in terms of inheritence distance) for which there is a > view registered. I was going to write some test cases for it next > though...because it hasn't been tested on anything but the > InformativeDescriptorImpl class. That said, I registered a view for > Informative, and it found it for my InformativeDesctiprorImpl which > implements Informative directly, so I'm not sure why it didn't work on > your ImageAlbum class. Perhaps once I write a test I will see... Well I don't think it can hurt to have this as a seperate class which different UI mechanisms can reuse - I'll take your code as a base and write one with full test coverage so we can work out any little kinks that might exist. sam http://www.magpiebrain.com/ |