Search in sources :

Example 6 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 7 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)

Example 8 with ZapToggleButton

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

the class SearchPanel method getScopeButton.

private JToggleButton getScopeButton() {
    if (scopeButton == null) {
        scopeButton = new ZapToggleButton();
        scopeButton.setIcon(new ImageIcon(SearchPanel.class.getResource("/resource/icon/fugue/target-grey.png")));
        scopeButton.setToolTipText(Constant.messages.getString("search.toolbar.tooltip.scope.unselected"));
        scopeButton.setSelectedIcon(new ImageIcon(SearchPanel.class.getResource("/resource/icon/fugue/target.png")));
        scopeButton.setSelectedToolTipText(Constant.messages.getString("search.toolbar.tooltip.scope.selected"));
        DisplayUtils.scaleIcon(scopeButton);
        scopeButton.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                extension.setSearchJustInScope(scopeButton.isSelected());
            }
        });
    }
    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 9 with ZapToggleButton

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

the class AbstractScanToolbarStatusPanel method getPauseScanButton.

private JToggleButton getPauseScanButton() {
    if (pauseScanButton == null) {
        pauseScanButton = new ZapToggleButton();
        pauseScanButton.setToolTipText(Constant.messages.getString(panelPrefix + ".toolbar.button.pause"));
        pauseScanButton.setSelectedToolTipText(Constant.messages.getString(panelPrefix + ".toolbar.button.unpause"));
        pauseScanButton.setIcon(new ImageIcon(ScanPanel.class.getResource("/resource/icon/16/141.png")));
        pauseScanButton.setRolloverIcon(new ImageIcon(ScanPanel.class.getResource("/resource/icon/16/141.png")));
        pauseScanButton.setSelectedIcon(new ImageIcon(ScanPanel.class.getResource("/resource/icon/16/131.png")));
        pauseScanButton.setRolloverSelectedIcon(new ImageIcon(ScanPanel.class.getResource("/resource/icon/16/131.png")));
        pauseScanButton.setEnabled(false);
        pauseScanButton.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                if (isScanPaused(getSelectedContext())) {
                    resumeScan(getSelectedContext());
                } else {
                    pauseScan(getSelectedContext());
                }
            }
        });
    }
    return pauseScanButton;
}
Also used : ImageIcon(javax.swing.ImageIcon) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) ZapToggleButton(org.zaproxy.zap.view.ZapToggleButton)

Example 10 with ZapToggleButton

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

the class MainFrame method getAboveResponsePanelPositionButton.

private ZapToggleButton getAboveResponsePanelPositionButton() {
    if (aboveResponsePanelPositionButton == null) {
        aboveResponsePanelPositionButton = new ZapToggleButton(new SetResponsePanelPositionAction(WorkbenchPanel.class.getResource("/resource/icon/layout_vertical_split.png"), WorkbenchPanel.ResponsePanelPosition.PANEL_ABOVE));
        aboveResponsePanelPositionButton.setToolTipText(ABOVE_VIEW_TOOL_TIP);
        aboveResponsePanelPositionButton.setDisabledToolTipText(DISABLED_ABOVE_VIEW_TOOL_TIP);
    }
    return aboveResponsePanelPositionButton;
}
Also used : 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