New Jide License
[indepmod/experimental.git] / IndependentModeler / src / cz / cvut / promod / gui / dialogs / pluginsOverview / PluginsOverviewDialogDialog.java
blob680a10f4fb73099ade8bd7111b4da89a5aa72d3a
1 package cz.cvut.promod.gui.dialogs.pluginsOverview;
3 import cz.cvut.promod.gui.dialogs.pluginsOverview.notations.NotationOverviewTab;
4 import cz.cvut.promod.gui.dialogs.pluginsOverview.extensions.ExtensionOverviewTab;
5 import cz.cvut.promod.services.ModelerSession;
7 import javax.swing.*;
8 import java.awt.event.*;
10 /**
11 * ProMod, master thesis project
12 * User: Petr Zverina, petr.zverina@gmail.com
13 * Date: 16:38:19, 11.2.2010
15 * Dialog for plugin overview.
17 public class PluginsOverviewDialogDialog extends PluginsOverviewDialogView {
19 public static final String TITLE =
20 ModelerSession.getCommonResourceBundle().getString("modeler.plugins.overview");
21 public static final String NOTATION_AND_MODULE_LABEL =
22 ModelerSession.getCommonResourceBundle().getString("modeler.plugins.overview.notations.title");
23 public static final String EXTENSIONS_LABEL =
24 ModelerSession.getCommonResourceBundle().getString("modeler.plugins.overview.extension.title");
25 public static final String IDENTIFIER_LABEL =
26 ModelerSession.getCommonResourceBundle().getString("modeler.plugins.overview.identifier");
27 public static final String NAME_LABEL =
28 ModelerSession.getCommonResourceBundle().getString("modeler.plugins.overview.name");
29 public static final String DESCRIPTION_LABEL =
30 ModelerSession.getCommonResourceBundle().getString("modeler.plugins.overview.description");
31 public static final String ABBREVIATION_LABEL =
32 ModelerSession.getCommonResourceBundle().getString("modeler.plugins.overview.abbreviation");
33 public static final String FULL_NAME_LABEL =
34 ModelerSession.getCommonResourceBundle().getString("modeler.plugins.overview.full.name");
35 public static final String TOOL_TIP_LABEL =
36 ModelerSession.getCommonResourceBundle().getString("modeler.plugins.overview.tool.tip");
37 public static final String FILE_EXTENSION_LABEL =
38 ModelerSession.getCommonResourceBundle().getString("modeler.plugins.overview.file.ext");
39 public static final String EXTENSION_LABEL =
40 ModelerSession.getCommonResourceBundle().getString("modeler.plugin.extension");
41 public static final String NOTATION_LABEL =
42 ModelerSession.getCommonResourceBundle().getString("modeler.plugin.notation");
43 public static final String MODULE_LABEL =
44 ModelerSession.getCommonResourceBundle().getString("modeler.plugin.module");
46 public PluginsOverviewDialogDialog(){
47 initTabbedPane();
49 setModal(true);
51 setTitle(TITLE);
53 setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
55 setLocationRelativeTo(ModelerSession.getFrame());
57 initEventHandling();
59 setVisible(true);
62 private void initEventHandling() {
63 addWindowListener(new WindowAdapter(){
64 public void windowClosing(WindowEvent e){
65 disposeDialog();
67 });
69 getRootPane().registerKeyboardAction(new ActionListener(){
70 public void actionPerformed(ActionEvent actionEvent) {
71 disposeDialog();
74 KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
75 JComponent.WHEN_IN_FOCUSED_WINDOW);
78 /**
79 * Hides the dialog.
81 private void disposeDialog(){
82 setVisible(false);
83 dispose();
86 private void initTabbedPane() {
87 tabbedPane.addTab(NOTATION_AND_MODULE_LABEL, null, new NotationOverviewTab());
88 tabbedPane.addTab(EXTENSIONS_LABEL, null, new ExtensionOverviewTab());