class MediaButton extends StackPaneButton {

    void setupEvent(EventHandler<ActionEvent> newMediaEvent, GazeIndicator progressIndicator) {
        this.removeEventFilter(MouseEvent.MOUSE_CLICKED, clickEvent);
        this.removeEventFilter(GazeEvent.GAZE_ENTERED, enterEvent);
        this.removeEventFilter(GazeEvent.GAZE_EXITED, exitEvent);

        clickEvent = e -> {
            newMediaEvent.handle(null);
        };

        this.addEventFilter(MouseEvent.MOUSE_CLICKED, clickEvent);

        enterEvent = eventEntered -> {
            if(!this.getChildren().contains(progressIndicator)) {
                this.getChildren().add(progressIndicator);
            }
            progressIndicator.setOnFinish(newMediaEvent);
            progressIndicator.start();
        };

        exitEvent = eventExited -> {
            progressIndicator.stop();
            this.getChildren().remove(progressIndicator);
        };

        this.addEventFilter(MouseEvent.MOUSE_ENTERED, enterEvent);

        this.addEventFilter(MouseEvent.MOUSE_EXITED, exitEvent);

        this.addEventFilter(GazeEvent.GAZE_ENTERED, enterEvent);

        this.addEventFilter(GazeEvent.GAZE_EXITED, exitEvent);
    }

      MediaButton(double width, double height);

}