Welcome to the Elementary Plugin Framework for Java (EPF4J) project homepage
Hi there. I put this crappy webpage up to explain how the plugin framework works. The framework works as follows:
- The application must be event driven
- The PluginManager is the only object your application needs to know about
- You must set a series of properties for the plugin manager before you load the plugins from the plugin.xml file. For example, if your plugin uses the Swing GUI components, you will need to set a parent such as JFrame to the plugin manager. Other examples include the app working directory, cache directory, etc.
- The GUI integration for the plugin is via a JMenuItem. Note that your plugin is not required to implement a GUI, and can just return null in this case. If you have features that are accessible via the applications GUI, the plugin shoudl return a pre-built (meaning fully configured, with sub-menus and actionListeners) JMenuItem object. The application should listen for the REGISTER_PLUGIN_UI event. The even source object will be a handle to the JMenuItem for this plugin. It can then be added to your main menu under a sub-menu such as "Plugins".
In the future, additinoal UI integration options should be available, such as toolbars in your application
For more info, see the
EPF4J API JavaDocs