Bug #3147
closedGet rid of Swing componets in Ecogrid data access classes
0%
Description
Here is an email from Matt:
Jing,
I noticed you're having difficulty with calling the ecogrid data access classes from within JUnit tests. This illustrates an
underlying problem in the implementation -- that it depends on GUI classes -- that would also surface when running kepler in headless
mode on the command line or behind a web interface. Rather than calling JOptionPane directly, you should probably be callinga
mediator class like ptolemy.util.MessageHandler that can be configured to do different things depending on whether it has a GUI
available or just stdout available. This design follows the basic Mediator pattern and would help in improving the overall design. I
think anytime you are instantiating Swing components in an actor we are possibly limiting the execution environment of the actor.
Can you factor out these alerts so that the use the mediator pattern?
Matt