Search in sources :

Example 11 with ZapToggleButton

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

the class MainFrame method getPanelsResponsePanelPositionButton.

private ZapToggleButton getPanelsResponsePanelPositionButton() {
    if (panelsResponsePanelPositionButton == null) {
        panelsResponsePanelPositionButton = new ZapToggleButton(new SetResponsePanelPositionAction(WorkbenchPanel.class.getResource("/resource/icon/layout_horizontal_split.png"), WorkbenchPanel.ResponsePanelPosition.PANELS_SIDE_BY_SIDE));
        panelsResponsePanelPositionButton.setToolTipText(SIDE_BY_SIDE_VIEW_TOOL_TIP);
        panelsResponsePanelPositionButton.setDisabledToolTipText(DISABLED_SIDE_BY_SIDE_VIEW_TOOL_TIP);
    }
    return panelsResponsePanelPositionButton;
}
Also used : ZapToggleButton(org.zaproxy.zap.view.ZapToggleButton)

Example 12 with ZapToggleButton

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

the class ExtensionForcedUser method getForcedUserModeToggleButton.

private JToggleButton getForcedUserModeToggleButton() {
    if (forcedUserModeButton == null) {
        forcedUserModeButton = new ZapToggleButton();
        forcedUserModeButton.setIcon(new ImageIcon(ExtensionForcedUser.class.getResource(FORCED_USER_MODE_OFF_ICON_RESOURCE)));
        forcedUserModeButton.setSelectedIcon(new ImageIcon(ExtensionForcedUser.class.getResource(FORCED_USER_MODE_ON_ICON_RESOURCE)));
        forcedUserModeButton.setToolTipText(BUTTON_LABEL_OFF);
        forcedUserModeButton.setSelectedToolTipText(BUTTON_LABEL_ON);
        forcedUserModeButton.setDisabledToolTipText(BUTTON_LABEL_DISABLED);
        // Disable until login and one indicator flagged
        forcedUserModeButton.setEnabled(false);
        forcedUserModeButton.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                setForcedUserModeEnabled(getForcedUserModeToggleButton().isSelected());
            }
        });
    }
    return forcedUserModeButton;
}
Also used : ImageIcon(javax.swing.ImageIcon) ActionEvent(java.awt.event.ActionEvent) ZapToggleButton(org.zaproxy.zap.view.ZapToggleButton)

Example 13 with ZapToggleButton

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

the class SiteMapPanel method getScopeButton.

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

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                setFilter();
            }
        });
    }
    return scopeButton;
}
Also used : ImageIcon(javax.swing.ImageIcon) ZapToggleButton(org.zaproxy.zap.view.ZapToggleButton)

Example 14 with ZapToggleButton

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

the class LogPanel method getScopeButton.

private JToggleButton getScopeButton() {
    if (scopeButton == null) {
        scopeButton = new ZapToggleButton();
        scopeButton.setIcon(new ImageIcon(LogPanel.class.getResource("/resource/icon/fugue/target-grey.png")));
        scopeButton.setToolTipText(Constant.messages.getString("history.scope.button.unselected"));
        scopeButton.setSelectedIcon(new ImageIcon(LogPanel.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());
            }
        });
        historyListFiltersButtonGroup.add(scopeButton);
    }
    return scopeButton;
}
Also used : ImageIcon(javax.swing.ImageIcon) ZapToggleButton(org.zaproxy.zap.view.ZapToggleButton)

Example 15 with ZapToggleButton

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

the class LogPanel method getLinkWithSitesTreeButton.

private JToggleButton getLinkWithSitesTreeButton() {
    if (linkWithSitesTreeButton == null) {
        linkWithSitesTreeButton = new ZapToggleButton();
        linkWithSitesTreeButton.setIcon(new ImageIcon(LogPanel.class.getResource("/resource/icon/16/earth-grey.png")));
        linkWithSitesTreeButton.setToolTipText(Constant.messages.getString("history.linkWithSitesSelection.unselected.button.tooltip"));
        linkWithSitesTreeButton.setSelectedIcon(new ImageIcon(LogPanel.class.getResource("/resource/icon/16/094.png")));
        linkWithSitesTreeButton.setSelectedToolTipText(Constant.messages.getString("history.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());
            }
        });
        historyListFiltersButtonGroup.add(linkWithSitesTreeButton);
    }
    return linkWithSitesTreeButton;
}
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