package be.iminds.ilabt.jfed.experimenter_gui.timeline.view;

import be.iminds.ilabt.jfed.experimenter_gui.timeline.model.TimelineModelFactory;
import be.iminds.ilabt.jfed.experimenter_gui.editor.ModelRspecEditor;
import be.iminds.ilabt.jfed.experimenter_gui.slice.NodePropertiesDialogFactory;
import be.iminds.ilabt.jfed.experimenter_gui.util.ImageUtil;
import be.iminds.ilabt.jfed.preferences.JFedGuiPreferences;

import javax.inject.Inject;
import javax.inject.Singleton;

/**
 * User: twalcari
 * Date: 1/29/2015
 * Time: 16:55
 */
@Singleton
public class TimelineViewFactory {
    private final NodePropertiesDialogFactory nodePropertiesDialogFactory;
    private final ImageUtil imageUtil;

    private final TimelineModelFactory timelineModelFactory;
    private final JFedGuiPreferences jFedPreferences;

    @Inject
    TimelineViewFactory(NodePropertiesDialogFactory nodePropertiesDialogFactory,
                        ImageUtil imageUtil, TimelineModelFactory timelineModelFactory, JFedGuiPreferences jFedPreferences) {
        this.timelineModelFactory = timelineModelFactory;
        this.nodePropertiesDialogFactory = nodePropertiesDialogFactory;
        this.imageUtil = imageUtil;
        this.jFedPreferences = jFedPreferences;
    }

    public TimelineView createControllerUI(ModelRspecEditor modelRspecEditor) {
        return new TimelineView(modelRspecEditor.getModelRspec(), nodePropertiesDialogFactory, imageUtil, timelineModelFactory, jFedPreferences);
    }
}
