Search in sources :

Example 1 with ContextSelectComboBox

use of org.zaproxy.zap.view.widgets.ContextSelectComboBox in project zaproxy by zaproxy.

the class AbstractContextSelectToolbarStatusPanel method getContextSelectComboBox.

/**
	 * Gets the Context select combo box.
	 *
	 * @return the context select combo box
	 */
protected ContextSelectComboBox getContextSelectComboBox() {
    if (contextSelectBox == null) {
        contextSelectBox = new ContextSelectComboBox();
        contextSelectBox.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                contextSelected((Context) contextSelectBox.getSelectedItem());
            }
        });
    }
    return contextSelectBox;
}
Also used : Context(org.zaproxy.zap.model.Context) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) ContextSelectComboBox(org.zaproxy.zap.view.widgets.ContextSelectComboBox)

Example 2 with ContextSelectComboBox

use of org.zaproxy.zap.view.widgets.ContextSelectComboBox in project zaproxy by zaproxy.

the class StandardFieldsDialog method addContextSelectField.

public void addContextSelectField(int tabIndex, String fieldLabel, Context selectedContext) {
    if (!isTabbed()) {
        throw new IllegalArgumentException("Not initialised as a tabbed dialog - must use method without tab parameters");
    }
    if (tabIndex < 0 || tabIndex >= this.tabPanels.size()) {
        throw new IllegalArgumentException("Invalid tab index: " + tabIndex);
    }
    ContextSelectComboBox field = new ContextSelectComboBox();
    if (selectedContext != null) {
        field.setSelectedItem(selectedContext);
    }
    this.addField(this.tabPanels.get(tabIndex), this.tabOffsets.get(tabIndex), fieldLabel, field, field, 0.0D);
    incTabOffset(tabIndex);
}
Also used : ContextSelectComboBox(org.zaproxy.zap.view.widgets.ContextSelectComboBox)

Example 3 with ContextSelectComboBox

use of org.zaproxy.zap.view.widgets.ContextSelectComboBox in project zaproxy by zaproxy.

the class StandardFieldsDialog method addContextSelectField.

public void addContextSelectField(String fieldLabel, Context selectedContext) {
    if (isTabbed()) {
        throw new IllegalArgumentException("Initialised as a tabbed dialog - must use method with tab parameters");
    }
    ContextSelectComboBox field = new ContextSelectComboBox();
    if (selectedContext != null) {
        field.setSelectedItem(selectedContext);
    }
    this.addField(fieldLabel, field, field, 0.0D);
}
Also used : ContextSelectComboBox(org.zaproxy.zap.view.widgets.ContextSelectComboBox)

Aggregations

ContextSelectComboBox (org.zaproxy.zap.view.widgets.ContextSelectComboBox)3 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 Context (org.zaproxy.zap.model.Context)1