Search in sources :

Example 1 with ZapToggleButton

use of org.zaproxy.zap.view.ZapToggleButton 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;
}
Also used : ImageIcon(javax.swing.ImageIcon) ActionListener(java.awt.event.ActionListener) ZapToggleButton(org.zaproxy.zap.view.ZapToggleButton) ActionEvent(java.awt.event.ActionEvent)

Example 2 with ZapToggleButton

use of org.zaproxy.zap.view.ZapToggleButton 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;
}
Also used : ImageIcon(javax.swing.ImageIcon) ActionListener(java.awt.event.ActionListener) ZapToggleButton(org.zaproxy.zap.view.ZapToggleButton) ActionEvent(java.awt.event.ActionEvent)

Example 3 with ZapToggleButton

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

the class BreakPanelToolbarFactory method getBtnBreakResponse.

public JToggleButton getBtnBreakResponse() {
    ZapToggleButton btnBreakResponse;
    btnBreakResponse = new ZapToggleButton(breakResponsesButtonAction);
    btnBreakResponse.setSelectedIcon(new ImageIcon(BreakPanelToolbarFactory.class.getResource("/resource/icon/16/106r.png")));
    btnBreakResponse.setSelectedToolTipText(Constant.messages.getString("brk.toolbar.button.response.unset"));
    return btnBreakResponse;
}
Also used : ImageIcon(javax.swing.ImageIcon) ZapToggleButton(org.zaproxy.zap.view.ZapToggleButton)

Example 4 with ZapToggleButton

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

the class BreakPanelToolbarFactory method getBtnBreakAll.

public JToggleButton getBtnBreakAll() {
    ZapToggleButton btnBreakAll;
    btnBreakAll = new ZapToggleButton(breakAllButtonAction);
    btnBreakAll.setSelectedIcon(new ImageIcon(BreakPanelToolbarFactory.class.getResource("/resource/icon/16/151.png")));
    btnBreakAll.setSelectedToolTipText(Constant.messages.getString("brk.toolbar.button.all.unset"));
    return btnBreakAll;
}
Also used : ImageIcon(javax.swing.ImageIcon) ZapToggleButton(org.zaproxy.zap.view.ZapToggleButton)

Example 5 with ZapToggleButton

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

the class BreakPanelToolbarFactory method getBtnBreakRequest.

public JToggleButton getBtnBreakRequest() {
    ZapToggleButton btnBreakRequest;
    btnBreakRequest = new ZapToggleButton(breakRequestsButtonAction);
    btnBreakRequest.setSelectedIcon(new ImageIcon(BreakPanelToolbarFactory.class.getResource("/resource/icon/16/105r.png")));
    btnBreakRequest.setSelectedToolTipText(Constant.messages.getString("brk.toolbar.button.request.unset"));
    return btnBreakRequest;
}
Also used : ImageIcon(javax.swing.ImageIcon) ZapToggleButton(org.zaproxy.zap.view.ZapToggleButton)

Aggregations

ZapToggleButton (org.zaproxy.zap.view.ZapToggleButton)15 ImageIcon (javax.swing.ImageIcon)12 ActionEvent (java.awt.event.ActionEvent)6 ActionListener (java.awt.event.ActionListener)4 ConfigurationException (org.apache.commons.configuration.ConfigurationException)1