private void stopButtonAction() {
        text.append(String.format("Stopping current action.%s", newline));
        // Remember the state before stopping
        State state = currentState;

        // Set to initial
        this.setStateInitial();

        //remove buttons
        if (!results.isEmpty())
        {
            text.append(String.format("Removing results.%s", newline));
            results.clear();
            showTimes();
        }

        if (state == State.PROCESSING) {
            if (!this.mediator.stopVideoProcessing())
            {
                text.append(String.format("Failed to stop the processing.%s", newline));
                return;
            }

            text.append(String.format("Video processing stopped.%s", newline));
        }

        if (state == State.FINISHING) {
            if (!this.mediator.stopCuttingAds())
            {
                text.append(String.format("Failed to stop the ads cutting.%s", newline));
                return;
            }

            text.append(String.format("Ads cutting stopped.%s", newline));
        }
        text.append(String.format("--------------------------%s", newline));
    }