use of javax.swing.ImageIcon in project zaproxy by zaproxy.
the class MainFrame method getShowAllTabsButton.
private JButton getShowAllTabsButton() {
if (showAllTabsButton == null) {
showAllTabsButton = new JButton();
showAllTabsButton.setIcon(new ImageIcon(WorkbenchPanel.class.getResource("/resource/icon/fugue/ui-tab-show.png")));
showAllTabsButton.setToolTipText(Constant.messages.getString("menu.view.tabs.show"));
DisplayUtils.scaleIcon(showAllTabsButton);
showAllTabsButton.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
View.getSingleton().showAllTabs();
}
});
}
return showAllTabsButton;
}
use of javax.swing.ImageIcon in project zaproxy by zaproxy.
the class MainFrame method getShowTabIconNamesButton.
private JToggleButton getShowTabIconNamesButton() {
if (showTabIconNamesButton == null) {
showTabIconNamesButton = new ZapToggleButton();
showTabIconNamesButton.setIcon(new ImageIcon(WorkbenchPanel.class.getResource("/resource/icon/ui_tab_icon.png")));
showTabIconNamesButton.setToolTipText(Constant.messages.getString("view.toolbar.showNames"));
showTabIconNamesButton.setSelectedIcon(new ImageIcon(WorkbenchPanel.class.getResource("/resource/icon/ui_tab_text.png")));
showTabIconNamesButton.setSelectedToolTipText(Constant.messages.getString("view.toolbar.showIcons"));
showTabIconNamesButton.setSelected(Model.getSingleton().getOptionsParam().getViewParam().getShowTabNames());
DisplayUtils.scaleIcon(showTabIconNamesButton);
showTabIconNamesButton.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
boolean showTabNames = getShowTabIconNamesButton().isSelected();
setShowTabNames(showTabNames);
Model.getSingleton().getOptionsParam().getViewParam().setShowTabNames(showTabNames);
try {
Model.getSingleton().getOptionsParam().getViewParam().getConfig().save();
} catch (ConfigurationException e) {
LOGGER.error(e.getMessage(), e);
}
}
});
}
return showTabIconNamesButton;
}
use of javax.swing.ImageIcon in project zaproxy by zaproxy.
the class AlertPanel method getLinkWithSitesTreeButton.
/**
* Returns the toggle button that enables/disables the "Alerts" tree filtering based on the "Sites" tree selection.
* <p>
* The instance variable {@code linkWithSitesTreeButton} is initialised on the first call to this method.
* </p>
*
* @see #linkWithSitesTreeButton
* @return the toggle button that enables/disables the "Alerts" tree filtering based on the "Sites" tree selection
*/
private JToggleButton getLinkWithSitesTreeButton() {
if (linkWithSitesTreeButton == null) {
linkWithSitesTreeButton = new ZapToggleButton();
linkWithSitesTreeButton.setIcon(new ImageIcon(AlertPanel.class.getResource("/resource/icon/16/earth-grey.png")));
linkWithSitesTreeButton.setToolTipText(Constant.messages.getString("alerts.panel.linkWithSitesSelection.unselected.button.tooltip"));
linkWithSitesTreeButton.setSelectedIcon(new ImageIcon(AlertPanel.class.getResource("/resource/icon/16/094.png")));
linkWithSitesTreeButton.setSelectedToolTipText(Constant.messages.getString("alerts.panel.linkWithSitesSelection.selected.button.tooltip"));
DisplayUtils.scaleIcon(linkWithSitesTreeButton);
linkWithSitesTreeButton.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
setLinkWithSitesTreeSelection(linkWithSitesTreeButton.isSelected());
}
});
alertsTreeFiltersButtonGroup.add(linkWithSitesTreeButton);
}
return linkWithSitesTreeButton;
}
use of javax.swing.ImageIcon in project zaproxy by zaproxy.
the class AlertPanel method initialize.
/**
* This method initializes this
*/
private void initialize() {
this.setLayout(new CardLayout());
this.setSize(274, 251);
this.setName(Constant.messages.getString("alerts.panel.title"));
// 'flag' icon
this.setIcon(new ImageIcon(AlertPanel.class.getResource("/resource/icon/16/071.png")));
this.add(getPanelCommand(), getPanelCommand().getName());
this.setDefaultAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() | Event.SHIFT_MASK, false));
this.setMnemonic(Constant.messages.getChar("alerts.panel.mnemonic"));
this.setShowByDefault(true);
}
use of javax.swing.ImageIcon in project zaproxy by zaproxy.
the class AlertPanel method getScopeButton.
private JToggleButton getScopeButton() {
if (scopeButton == null) {
scopeButton = new ZapToggleButton();
scopeButton.setIcon(new ImageIcon(AlertPanel.class.getResource("/resource/icon/fugue/target-grey.png")));
scopeButton.setToolTipText(Constant.messages.getString("history.scope.button.unselected"));
scopeButton.setSelectedIcon(new ImageIcon(AlertPanel.class.getResource("/resource/icon/fugue/target.png")));
scopeButton.setSelectedToolTipText(Constant.messages.getString("history.scope.button.selected"));
DisplayUtils.scaleIcon(scopeButton);
scopeButton.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
extension.setShowJustInScope(scopeButton.isSelected());
}
});
alertsTreeFiltersButtonGroup.add(scopeButton);
}
return scopeButton;
}
Aggregations