Thanks, Connor. UIDelegate makes a lot of sense. I'll try that. I'll start with a survey of the pcgen.gui2.facade classes and see which are using Swing/AWT and which are depending on other pcgen.gui2 packages, and see what we can delegate.
As for EventListener, I already did that replacement for the non-pcgen.gui classes.
The best way to deal with it would be to create an invokeLater() method in the UIDelegate. That way such event thread behavior could be implemented for different systems. The facade implementations should be UI independent so catching these kind of dependencies is a good thing. If you find any other swing dependency issues try to delegate them out through the UIDelegate.
That said, I still think there are some swing dependencies that will need to be handled differently. IIRC a lot of facade implementations use javax.swing.event.EventListenerList. Something like that will probably need a local implementation as a replacement. Looks like the UndoManager will give you some problems in the CharacterFacadeImpl, you can just ignore that for now, it is not currently used. There are likely some more gotchas you will find but hopefully you will not need to resort to a custom facade implementation.
You are making great progress and I look forward to seeing the results.
On Sat, Feb 2, 2013 at 3:50 PM, Chris Dolan <chris@...>