Filtering passed and failed scenarios by clicking the passed or failed button respectively

@param buttonState indicates the clicked button
160113
function (buttonState) {
            var scenarios = document.querySelectorAll('.scenario'),
                hasClass,
                self = this;
            for (var i = 0; i < scenarios.length; i++) {
                hasClass = scenarios[i].classList.contains(buttonState);
                if (hasClass === true) {
                    if (scenarios[i].parentNode.style.display === 'none') {
                        scenarios[i].parentNode.style.display = 'block';
                    }
                } else {
                    scenarios[i].parentNode.style.display = 'none';
                }
            }

            if (buttonState === 'failed') {
                self.currentView = 'failed';
                this.hideFeatureContainer('passed');
            } else {
                self.currentView = 'passed';
                this.hideFeatureContainer('failed');
            }
        }
89100
@Override
    public void buttonClick(final ClickEvent event) {
        if (window.getParent() != null) {
            isImplicitClose = true;
            UI.getCurrent().removeWindow(window);
        }
        callback.response(event.getSource().equals(okButton));
    }
1063209
protected final void attemptCloseDialog() {
        switch (buttonType) {
            case AlertDialog.BUTTON_NEGATIVE:
                dialog.cancel();
                break;
            case AlertDialog.BUTTON_NEUTRAL:
                dialog.cancel();
                break;
            case AlertDialog.BUTTON_POSITIVE:
                dialog.dismiss();
                break;
            default:
                break;
        }
    }
446522
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
        // Exit dialogue and send content to main window
        OkapiUI.dataInputField.setText(dataInputArea.getText());
        dispose();
    }
547711
private void buttonSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSaveActionPerformed
    final File home = new File(System.getProperty("user.home")); //NOI18N
    final File toSave = new FileChooserBuilder("user-home-dir").
        setTitle(java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle").getString("PlainTextEditor.buttonSaveActionPerformed.saveTitle")).
        addFileFilter(TEXT_FILE_FILTER).setFileFilter(TEXT_FILE_FILTER).
        setFilesOnly(true).
        setDefaultWorkingDirectory(home).
        showSaveDialog();
    if (toSave != null) {
      try {
        final String text = getText();
        FileUtils.writeStringToFile(toSave, text, "UTF-8"); //NOI18N
      }
      catch (Exception ex) {
        LOGGER.error("Error during text file saving", ex); //NOI18N
        NbUtils.msgError(null, java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle").getString("PlainTextEditor.buttonSaveActionPerformed.msgError"));
      }
    }
  }
718782
public void onExecutionFailed(ExecutionContext<I> context, Throwable finalException, ExecutionInfo info) {
        for (ExecutionListener<I, O> listener: listeners) {
            try {
                if (!isListenerDisabled(listener)) {
                    listener.onExecutionFailed(context.getChildContext(listener), finalException, info);
                }
            } catch (Throwable e) {
                logger.error("Error invoking listener " + listener, e);
            }
        }
    }
1777
public void throwIfUnsupportedFilter(Scan scan, Filter filter) {
    List<FilterSupportStatus> filterSupportStatuses = new ArrayList<>();
    FilterAdapterContext context = new FilterAdapterContext(scan, null);
    collectUnsupportedStatuses(context, filter, filterSupportStatuses);
    if (!filterSupportStatuses.isEmpty()) {
      throw new UnsupportedFilterException(filterSupportStatuses);
    }
  }
214872
function buttonsFromAllFeatures() {
      const buttons = $scope.features.buttons.map( ( button, i ) => {
         button.fallbackIndex = i + DEFAULT_BUTTONS.length;
         return button;
      } );
      DEFAULT_BUTTONS.forEach( ( buttonFeatureName, i ) => {
         const button = $scope.features[ buttonFeatureName ];
         if( button ) {
            button.fallbackIndex = i;
            buttons.push( button );
         }
      } );
      return buttons.filter( button => button.enabled );
   }
1229804
private void processOverdueFilterStatus() {
        overdueBtnClicked = !overdueBtnClicked;
        managementUIState.getTargetTableFilters().setOverdueFilterEnabled(overdueBtnClicked);

        if (overdueBtnClicked) {
            buttonClicked.addStyleName(BTN_CLICKED);
            eventBus.publish(this, TargetFilterEvent.FILTER_BY_STATUS);
        } else {
            buttonClicked.removeStyleName(BTN_CLICKED);
            eventBus.publish(this, TargetFilterEvent.REMOVE_FILTER_BY_STATUS);
        }

    }
68681
public void onClick(MenuItemClickEvent event) {
		FeatureTransaction featureTransaction = mapModel.getFeatureEditor().getFeatureTransaction();
		if (featureTransaction != null) {
			List<Activity> activities = new ArrayList<Activity>();
			activities.add(new ValidationActivity());
			activities.add(new CommitActivity());
			WorkflowProcessor processor = new SequenceProcessor(new MapModelWorkflowContext());
			processor.setDefaultErrorHandler(new WorkflowErrorHandler() {

				public void handleError(WorkflowContext context, Throwable throwable) {
					SC.warn(I18nProvider.getGlobal().saveEditingAborted() + throwable.getMessage());
				}
			});
			processor.setActivities(activities);
			processor.doActivities(mapModel);

			// Cleaning up duties: controller and MapWidget (if they're present)
			if (controller != null) {
				controller.cleanup();
			}
			if (mapWidget != null) {
				mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
			}
			mapModel.getFeatureEditor().stopEditing();
		}
	}
1033127
public void reportFailure(E failureException) {
        assert failureException != null;
        connectionLock.lock();
        try {
            state = State.Failure;
            this.failureException = failureException;
            condition.signalAll();
        }
        finally {
            connectionLock.unlock();
        }
    }
684065
@Override
    public void onButtonClicked(int which, DialogInterface dialogInterface) {
        switch (which){
            case Dialog.BUTTON_POSITIVE:
                if(mListener != null) mListener.onAccepted(getText());
                break;
            case Dialog.BUTTON_NEGATIVE:
                // Do nothing for the negative click
                break;
        }
    }
953400
public void acceptPrompt() {
        String action = "Clicking 'OK' on a prompt";
        String expected = "Prompt is present to be clicked";
        if (isNotPrompt(action, expected, "click")) {
            return;
        }
        accept(action, expected, "prompt");
    }
119165
private void handleNextButtonTextIntent(@NonNull final Bundle extras) {
        CharSequence text = extras.getString(EXTRA_NEXT_BUTTON_TEXT);

        if (!TextUtils.isEmpty(text)) {
            setNextButtonText(text);
        }
    }
346930
public void addButton(final AbstractButton button) {
        WidgetUtils.setDefaultButtonStyle(button);
        final EmptyBorder baseBorder =
                new EmptyBorder(WidgetUtils.BORDER_WIDE_WIDTH - 1, 9, WidgetUtils.BORDER_WIDE_WIDTH - 1, 9);
        if (getComponentCount() == 0) {
            button.setBorder(baseBorder);
        } else {
            final Component lastComponent = getComponent(getComponentCount() - 1);
            if (lastComponent instanceof AbstractButton) {
                // previous component was also a button - add a line on the left
                // side
                final Border outsideBorder = new MatteBorder(0, 1, 0, 0, WidgetUtils.BG_COLOR_LESS_BRIGHT);
                button.setBorder(new CompoundBorder(outsideBorder, baseBorder));
            } else {
                button.setBorder(baseBorder);
            }
        }
        button.setOpaque(false);
        _buttons.add(button);

        add(button);
    }
258132
public void fillWithCheckState(CompoundButton view) {
        validateNotNullableView(view);
        validateIfIsACompoundButton(view);

        view.setChecked(new Random().nextBoolean());
    }
151515
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
        // TODO add your handling code here:
        OkapiUI.compositeInputField.setText(compositeText.getText());
        dispose();
    }