Search in sources :

Example 1 with FileClearViewAction

use of easik.ui.menu.FileClearViewAction in project fql by CategoricalData.

the class ViewFrame method buildMenu.

/**
 * Builds the menu
 */
private void buildMenu() {
    JMenuBar mainMenu;
    @SuppressWarnings("unused") JMenu menuFile, menuAction, menuHelp;
    mainMenu = new JMenuBar();
    // Make the File Menu
    menuFile = new JMenu("File");
    final JMenu exportMenu = new JMenu("Export to");
    menuFile.add(exportMenu);
    menuFile.addSeparator();
    addMenuItem(exportMenu, new JMenuItem(new ExportImageAction<>(this)), null);
    mainMenu.add(menuFile);
    menuFile.setMnemonic(KeyEvent.VK_F);
    addMenuItem(menuFile, new JMenuItem(new FileClearViewAction(this)), null);
    menuFile.addSeparator();
    addMenuItem(menuFile, new JMenuItem(new DocumentInfoAction(this)), KeyEvent.VK_I);
    menuFile.addSeparator();
    addMenuItem(menuFile, new JMenuItem(new FileQuitAction(this)), KeyEvent.VK_W);
    // Create help menu
    menuHelp = new JMenu("Help");
    mainMenu.add(menuHelp);
    menuHelp.setMnemonic(KeyEvent.VK_H);
    menuHelp.add(new HelpAction());
    menuHelp.add(new AboutAction());
    setJMenuBar(mainMenu);
}
Also used : HelpAction(easik.ui.menu.HelpAction) FileQuitAction(easik.ui.menu.FileQuitAction) DocumentInfoAction(easik.ui.menu.DocumentInfoAction) AboutAction(easik.ui.menu.AboutAction) ExportImageAction(easik.ui.menu.ExportImageAction) FileClearViewAction(easik.ui.menu.FileClearViewAction) JMenuItem(javax.swing.JMenuItem) JMenuBar(javax.swing.JMenuBar) JMenu(javax.swing.JMenu)

Aggregations

AboutAction (easik.ui.menu.AboutAction)1 DocumentInfoAction (easik.ui.menu.DocumentInfoAction)1 ExportImageAction (easik.ui.menu.ExportImageAction)1 FileClearViewAction (easik.ui.menu.FileClearViewAction)1 FileQuitAction (easik.ui.menu.FileQuitAction)1 HelpAction (easik.ui.menu.HelpAction)1 JMenu (javax.swing.JMenu)1 JMenuBar (javax.swing.JMenuBar)1 JMenuItem (javax.swing.JMenuItem)1