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