Search in sources :

Example 1 with CheckUpdatePanel

use of com.sldeditor.update.CheckUpdatePanel in project sldeditor by robward-scisys.

the class SLDEditorMenus method createToolsMenu.

/**
 * Creates the tools menu.
 *
 * @param extensionList the extension list
 * @param menuBar the menu bar
 */
private void createToolsMenu(List<ExtensionInterface> extensionList, JMenuBar menuBar) {
    JMenu mnTools = new JMenu(Localisation.getString(SLDEditorMenus.class, "tools.menu"));
    menuBar.add(mnTools);
    JMenuItem mntmEnvVar = new JMenuItem(Localisation.getString(SLDEditorMenus.class, "tools.menu.envvar"));
    mntmEnvVar.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            EnvironmentVariableManager.getInstance().showDialog();
        }
    });
    mnTools.add(mntmEnvVar);
    JMenuItem mntmOptions = new JMenuItem(Localisation.getString(SLDEditorMenus.class, "tools.menu.options"));
    mntmOptions.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            PrefManagerUI.showPrefPanel();
        }
    });
    JMenuItem mntmCheckUpdates = new JMenuItem(Localisation.getString(SLDEditorMenus.class, "tools.menu.checkUpdates"));
    mntmCheckUpdates.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            CheckUpdatePanel panel = new CheckUpdatePanel();
            panel.showPanel(Version.getVersionNumber());
        }
    });
    // Create any extension specific menu items
    if (extensionList != null) {
        for (ExtensionInterface extension : extensionList) {
            extension.createMenus(mnTools);
        }
    }
    mnTools.add(mntmOptions);
    mnTools.add(mntmCheckUpdates);
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) ExtensionInterface(com.sldeditor.extension.ExtensionInterface) JMenuItem(javax.swing.JMenuItem) JMenu(javax.swing.JMenu) CheckUpdatePanel(com.sldeditor.update.CheckUpdatePanel)

Aggregations

ExtensionInterface (com.sldeditor.extension.ExtensionInterface)1 CheckUpdatePanel (com.sldeditor.update.CheckUpdatePanel)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 JMenu (javax.swing.JMenu)1 JMenuItem (javax.swing.JMenuItem)1