Posted Monday, March 26, 2007 @ 22:43:51
Hi,
I have a question: Why your events aren't interfaces? They are all Classes.
IMHO is better to create a simple couple of class and interfaces and use the ACTUAL classes as implementation of the interface. This will allow us to create one unique class to perfor any event within the table. (Its only a suggestion, if have any restrictions do do it, please let me know).
For example:
For the "DatabaseChangeListener" class:
My Suggestion is that this class should be an Interface:
public interface DatabaseChangeListener {
void afterDelete(int row) ;
...other methods
}
And you have an ADAPTER class that is the same class used today:
public class DatabaseChangeAdapter implements DatabaseChangeListener {
here goes the same code as your DatabaseChangeListener CLASS today.
}
This is only a suggestion and is a Standard way that java uses this kind of components (patterns).
This will allow people to have one class only and implements all the table interface events!!! That will be great.
For now, How can I have in one class various events for the table? Like DatabaseChangeListener and DBTableEventListener
Thanks a lot!!
i hope that my suggestion could be useful.
Bruno