Hi!
I would like to use CActions as normal actions for Swing components (for JButtons, JPopupMenus etc). It would be very convenient if CAction extended javax.swing.Action, so I could easily set the same actions for dockingframes AND SWING. What would be the drawbacks of such a design?
Thanks and best regards,
grml
A CAction (or DockAction) does not really have to be an ActionListener (Action extends ActionListener). Also going the way of the Action would mean to lose some typesafety. And finally: the type (subclass) of a CAction tells how it is used, an Action is more generic.
It would not be a drastic change, more a cosmetic one. For your purpose it might be enough to write some subclasses of CAction that implement Action as well. After all, “Action” does not specify any method that requires more than 3 lines of code.