package be.iminds.ilabt.jfed.experimenter_gui.slice.progress;

import be.iminds.ilabt.jfed.experimenter_gui.call_gui.TasksWindow;
import be.iminds.ilabt.jfed.highlevel.controller.TaskExecution;
import javafx.event.Event;
import javafx.event.EventHandler;

/**
 * User: twalcari
 * Date: 3/11/14
 * Time: 4:07 PM
 */
public class ShowTaskExecutionEventHandler implements EventHandler<Event> {
    private final TaskExecution taskExecution;
    private final TasksWindow tasksWindow;

    public ShowTaskExecutionEventHandler(TaskExecution taskExecution, TasksWindow tasksWindow) {
        this.taskExecution = taskExecution;
        this.tasksWindow = tasksWindow;
    }

    @Override
    public void handle(Event event) {
        tasksWindow.showTaskExecution(taskExecution);
    }
}
