On Wednesday, Aug 13, 2003, at 04:30 Europe/London, Greg Wilkins wrote:

firstly I was not the author of the original Component/Container
code... so I don't really know the answers to all your questions and
I too would like to see some more doco on it.

I think that people use this idea from the java.awt.Component, and java.awt.Container, which allows the container to recursively contain other container/components.


Personally, I'm not convinced that it's necessarily the right way to go for this implementation, since I don't think Containers will contain other Containers. However, there may well be a need for a supertype of both Component and Container that provides standard methods (such as getName()) ?

But the container/component thang is a pretty standard pattern and
can be found in most pattern books (can't remember the name but
it is probably container?)

It's referred to as Composite (page 163) in "Design patterns: Elements of reusable software" (0-201-63361-2) but is essentially the same thing.


Alex.



Reply via email to