Search in sources :

Example 31 with ZapMenuItem

use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.

the class MainMenuBar method getMenuToolsOptions.

private ZapMenuItem getMenuToolsOptions() {
    if (menuToolsOptions == null) {
        menuToolsOptions = new ZapMenuItem("menu.tools.options", View.getSingleton().getMenuShortcutKeyStroke(KeyEvent.VK_O, KeyEvent.ALT_DOWN_MASK, false));
        menuToolsOptions.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                getMenuToolsControl().options();
            }
        });
    }
    return menuToolsOptions;
}
Also used : ZapMenuItem(org.zaproxy.zap.view.ZapMenuItem) ActionEvent(java.awt.event.ActionEvent)

Example 32 with ZapMenuItem

use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.

the class MainMenuBar method getMenuHelpSupport.

private ZapMenuItem getMenuHelpSupport() {
    if (menuHelpSupport == null) {
        menuHelpSupport = new ZapMenuItem("menu.help.zap.support");
        menuHelpSupport.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                ZapSupportDialog zsd = new ZapSupportDialog(View.getSingleton().getMainFrame(), true);
                zsd.setVisible(true);
            }
        });
    }
    return menuHelpSupport;
}
Also used : ZapMenuItem(org.zaproxy.zap.view.ZapMenuItem) ZapSupportDialog(org.zaproxy.zap.view.ZapSupportDialog) ActionEvent(java.awt.event.ActionEvent)

Example 33 with ZapMenuItem

use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.

the class MainMenuBar method getMenuHelpAbout.

/**
 * Gets the About menu
 *
 * @return the 'About' menu item.
 */
private ZapMenuItem getMenuHelpAbout() {
    if (menuHelpAbout == null) {
        menuHelpAbout = new ZapMenuItem("menu.help.about");
        menuHelpAbout.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                AboutDialog dialog = new AboutDialog(View.getSingleton().getMainFrame(), true);
                dialog.setVisible(true);
            }
        });
    }
    return menuHelpAbout;
}
Also used : AboutDialog(org.zaproxy.zap.view.AboutDialog) ZapMenuItem(org.zaproxy.zap.view.ZapMenuItem) ActionEvent(java.awt.event.ActionEvent)

Example 34 with ZapMenuItem

use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.

the class View method registerMenu.

private void registerMenu(ExtensionKeyboard extKey, final AbstractPanel ap) {
    ZapMenuItem tabMenu = new ZapMenuItem(ap.getClass().getName(), Constant.messages.getString("menu.view.tab", ap.getName()), ap.getDefaultAccelerator());
    tabMenu.setMnemonic(ap.getMnemonic());
    if (ap.getIcon() != null) {
        tabMenu.setIcon(DisplayUtils.getScaledIcon(ap.getIcon()));
    }
    tabMenu.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            getWorkbench().showPanel(ap);
        }
    });
    menuShowTabs.add(tabMenu);
    if (extKey != null) {
        extKey.registerMenuItem(tabMenu);
    }
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) ZapMenuItem(org.zaproxy.zap.view.ZapMenuItem)

Example 35 with ZapMenuItem

use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.

the class MainMenuBar method getMenuContextExport.

private ZapMenuItem getMenuContextExport() {
    if (menuFileContextExport == null) {
        menuFileContextExport = new ZapMenuItem("menu.file.context.export");
        menuFileContextExport.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                getMenuFileControl().exportContext();
            }
        });
    }
    return menuFileContextExport;
}
Also used : ActionEvent(java.awt.event.ActionEvent) ZapMenuItem(org.zaproxy.zap.view.ZapMenuItem)

Aggregations

ZapMenuItem (org.zaproxy.zap.view.ZapMenuItem)42 ActionEvent (java.awt.event.ActionEvent)14 Component (java.awt.Component)3 ActionListener (java.awt.event.ActionListener)2 JMenu (javax.swing.JMenu)2 JMenuItem (javax.swing.JMenuItem)2 Target (org.zaproxy.zap.model.Target)2 File (java.io.File)1 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 FileAlreadyExistsException (java.nio.file.FileAlreadyExistsException)1 JFileChooser (javax.swing.JFileChooser)1 JList (javax.swing.JList)1 JTree (javax.swing.JTree)1 FileFilter (javax.swing.filechooser.FileFilter)1 TreePath (javax.swing.tree.TreePath)1 ConfigurationException (org.apache.commons.configuration.ConfigurationException)1 HistoryReference (org.parosproxy.paros.model.HistoryReference)1 SiteNode (org.parosproxy.paros.model.SiteNode)1 HttpMessage (org.parosproxy.paros.network.HttpMessage)1