Home
Categories
Dictionary
Download
Project Details
Changes Log
Tutorials
FAQ
License

About dialog



The framework has two methods allowing to show an About dialog:

Showing the list of Plugins

The PluginsMenuFactory.getAboutPluginsAction() method creates an About action showing the list of the Plugins.
aboutPlugins

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);
         }
      }

The description of the application and the list of the Plugins

The MDIMenuFactory.createDefaultMDIAbout(String, boolean) method creates an About action showing both the description of the application and the list of the Plugins:
  • The first argument is the name of the action (if null, then the default "About" name will be used)
  • The second argument specifies if the action is modal

The dialog will use the Application description



about

Example

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

         public SimpleMenuFactory() {
         }

         @Override
         protected void initMenus() {
           JMenuItem exitItem = new JMenuItem(getDefaultExitAction("Exit"));
           JMenuItem aboutItem = new JMenuItem(createDefaultMDIAbout(null, false));
           helpmenu.add(aboutItem);
           filemenu.add(exitItem);

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

Categories: gui | plugins | swing

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