use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.
the class ExtensionKeyboard method initAllMenuItems.
private void initAllMenuItems(JMenu menu) {
for (Component c : menu.getMenuComponents()) {
if (c instanceof ZapMenuItem) {
this.registerMenuItem((ZapMenuItem) c);
} else if (c instanceof JMenu) {
initAllMenuItems((JMenu) c);
} else if (c instanceof JMenuItem) {
JMenuItem menuItem = (JMenuItem) c;
logger.debug("Unable to set accelerators on menu " + menuItem.getText());
}
}
}
use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.
the class ExtensionFilter method getMenuToolsFilter.
/**
* This method initializes menuToolsFilter
*
* @return javax.swing.JMenuItem
*/
private ZapMenuItem getMenuToolsFilter() {
if (menuToolsFilter == null) {
menuToolsFilter = new ZapMenuItem("menu.tools.filter");
menuToolsFilter.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
FilterDialog dialog = new FilterDialog(getView().getMainFrame());
dialog.setAllFilters(filterFactory.getAllFilter());
dialog.showDialog(false);
boolean startThread = false;
for (Filter filter : filterFactory.getAllFilter()) {
if (filter.isEnabled()) {
startThread = true;
break;
}
}
if (startThread) {
if (timerFilterThread == null) {
timerFilterThread = new TimerFilterThread(filterFactory.getAllFilter());
timerFilterThread.start();
}
} else if (timerFilterThread != null) {
timerFilterThread.setStopped();
timerFilterThread = null;
}
}
});
}
return menuToolsFilter;
}
use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.
the class ExtensionSearch method getMenuPrev.
private ZapMenuItem getMenuPrev() {
if (menuPrev == null) {
menuPrev = new ZapMenuItem("menu.edit.previous");
menuPrev.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
searchPanel.highlightPrevResult();
}
});
}
return menuPrev;
}
use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.
the class ExtensionReport method getMenuItemMdReport.
private ZapMenuItem getMenuItemMdReport() {
if (menuItemMdReport == null) {
menuItemMdReport = new ZapMenuItem("menu.report.md.generate");
menuItemMdReport.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
ReportLastScan report = new ReportLastScan();
report.generateReport(getView(), getModel(), ReportLastScan.ReportType.MD);
}
});
}
return menuItemMdReport;
}
use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.
the class ExtensionReport method getMenuItemHtmlReport.
private ZapMenuItem getMenuItemHtmlReport() {
if (menuItemHtmlReport == null) {
menuItemHtmlReport = new ZapMenuItem("menu.report.html.generate");
menuItemHtmlReport.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
ReportLastScan report = new ReportLastScan();
report.generateReport(getView(), getModel(), ReportLastScan.ReportType.HTML);
}
});
}
return menuItemHtmlReport;
}
Aggregations