Saturday, March 10, 2012

Source code for NetBeans Actions solution

I just wanted to check back in and publish the source code for my solution to NetBeans' action paradigm issue that I talked about in this post.

AbstractActionDelegate.java
AbstractActionProvider.java
ActionProvider.java

Remember, objects listen to ActionProviders.  The ActionDelegate is the NetBeans-generated action.  If you have it extend AbstractActionDelegate, all it will do is notify its corresponding ActionProvider, which will in turn notify all listeners that an action has occurred.

Check out the unit test for AbstractActionDelegate to see an example of this in action.

No comments:

Post a Comment