Search in sources :

Example 1 with ContextExportDialog

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

the class ExtensionStdMenus method getPopupContextTreeMenuExport.

private PopupContextTreeMenu getPopupContextTreeMenuExport() {
    if (popupContextTreeMenuExport == null) {
        popupContextTreeMenuExport = new PopupContextTreeMenu();
        popupContextTreeMenuExport.setText(Constant.messages.getString("menu.file.context.export"));
        popupContextTreeMenuExport.setIcon(DisplayUtils.getScaledIcon(new ImageIcon(ExtensionStdMenus.class.getResource("/resource/icon/fugue/application-blue-export.png"))));
        popupContextTreeMenuExport.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                Context context = Model.getSingleton().getSession().getContext(popupContextTreeMenuExport.getContextId());
                ContextExportDialog exportDialog = new ContextExportDialog(View.getSingleton().getMainFrame());
                exportDialog.setSelectedContext(context);
                exportDialog.setVisible(true);
            }
        });
    }
    return popupContextTreeMenuExport;
}
Also used : Context(org.zaproxy.zap.model.Context) ImageIcon(javax.swing.ImageIcon) ContextExportDialog(org.zaproxy.zap.view.ContextExportDialog)

Example 2 with ContextExportDialog

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

the class MenuFileControl method exportContext.

/**
	 * Prompt the user to export a context
	 */
public void exportContext() {
    ContextExportDialog exportDialog = new ContextExportDialog(View.getSingleton().getMainFrame());
    exportDialog.setVisible(true);
}
Also used : ContextExportDialog(org.zaproxy.zap.view.ContextExportDialog)

Aggregations

ContextExportDialog (org.zaproxy.zap.view.ContextExportDialog)2 ImageIcon (javax.swing.ImageIcon)1 Context (org.zaproxy.zap.model.Context)1