Search in sources :

Example 1 with ActionSaveTab

use of com.jsql.view.swing.action.ActionSaveTab in project jsql-injection by ron190.

the class Menubar method initializeMenuFile.

private JMenu initializeMenuFile() {
    // File Menu > save tab | exit
    var menuFile = new JMenu(I18nUtil.valueByKey("MENUBAR_FILE"));
    I18nViewUtil.addComponentForKey("MENUBAR_FILE", menuFile);
    menuFile.setMnemonic('F');
    JMenuItem itemSave = new JMenuItemWithMargin(new ActionSaveTab());
    I18nViewUtil.addComponentForKey("MENUBAR_FILE_SAVETABAS", itemSave);
    JMenuItem itemExit = new JMenuItemWithMargin(I18nUtil.valueByKey("MENUBAR_FILE_EXIT"), 'x');
    I18nViewUtil.addComponentForKey("MENUBAR_FILE_EXIT", itemExit);
    itemExit.addActionListener(actionEvent -> MediatorHelper.frame().dispose());
    HotkeyUtil.addShortcut(Menubar.this);
    menuFile.add(itemSave);
    menuFile.add(new JSeparator());
    menuFile.add(itemExit);
    return menuFile;
}
Also used : JMenuItem(javax.swing.JMenuItem) ActionSaveTab(com.jsql.view.swing.action.ActionSaveTab) JMenu(javax.swing.JMenu) JSeparator(javax.swing.JSeparator)

Aggregations

ActionSaveTab (com.jsql.view.swing.action.ActionSaveTab)1 JMenu (javax.swing.JMenu)1 JMenuItem (javax.swing.JMenuItem)1 JSeparator (javax.swing.JSeparator)1