Home
Categories
Dictionary
Download
Project Details
Changes Log
Tutorials
FAQ
License

Showing the list of Plugins



The PluginsMenuFactory.getAboutPluginsAction() method creates an About action showing the list of the Plugins.
aboutPlugins
Each row presents:
  • The name of the Plugin
  • The version of the Plugin
  • The date of the Plugin
  • The description of the Plugin
  • A checkbox indicating if the Plugin is enabled. By default the checkbox is not editable[1]
    The fact that the chekbox is editable or not depend on the hot Plugins activation and deactivation policy

Hot Plugins activation and deactivation


Depending on the result of the MDIApplication.getPluginsDeactivationPolicy() method:
By default Plugins cannot be enabled and disabled at runtime in the AboutPlugins dialog.

Example

For example:
   public class MyMenuFactory extends AbstractMDIMenuFactory {
      private final JMenu filemenu = new JMenu("File");
      private final JMenu helpmenu = new JMenu("Help");

      public SecondMenuFactory() {
      }

      @Override
      protected void initMenus() {
        JMenuItem exitItem = new JMenuItem(getDefaultExitAction("Exit"));

        JMenuItem aboutPluginsItem = new JMenuItem(getPluginsMenuFactory().getAboutPluginsAction());
        helpmenu.add(aboutPluginsItem);

        filemenu.add(exitItem);

        Mbar.add(filemenu);
        Mbar.add(helpmenu);
      }
   }

Notes

  1. ^ The fact that the chekbox is editable or not depend on the hot Plugins activation and deactivation policy

Categories: Gui | Plugins | Swing

Copyright 2006-2023 Herve Girod. All Rights Reserved. Documentation and source under the LGPL v2 and Apache 2.0 licences