Buck Naked
August 2nd, 1999, 03:48 PM
I'm currently designing a program in which I use the Model, View, Controller paradigm in one section of it. What I have is a class with my data (my model) called FourPt. Now, I have many different JPanels that are going to "observe" the data in FourPt (approximately 8 JPanels). I have two JPanels which are superclasses to the previously mentioned 8 JPanels. My question is:
Can I make the two JPanels which are super classes of these 8 JPanels mentioned above as observers instead of making each of the individual 8 JPanels observe the FourPt?
If so, will the observer pattern be "inherited" because the 8 JPanels are inherited from the two super JPanels?
I'm just not sure my design approach is correct. Thanks in advance!
Shannon Harvey
ssharvey@usgs.gov
http://www.athletics.usm.edu/Attack.jpg
Can I make the two JPanels which are super classes of these 8 JPanels mentioned above as observers instead of making each of the individual 8 JPanels observe the FourPt?
If so, will the observer pattern be "inherited" because the 8 JPanels are inherited from the two super JPanels?
I'm just not sure my design approach is correct. Thanks in advance!
Shannon Harvey
ssharvey@usgs.gov
http://www.athletics.usm.edu/Attack.jpg