package be.iminds.ilabt.jfed.experimenter_gui.timeline.controller.action;

import be.iminds.ilabt.jfed.experimenter_gui.timeline.model.TimelineModel;
import be.iminds.ilabt.jfed.experimenter_gui.timeline.util.TimeCoordinateTranslator;
import be.iminds.ilabt.jfed.experimenter_gui.timeline.view.TimelineComponent;
import be.iminds.ilabt.jfed.experimenter_gui.timeline.view.UpdateEvent;

/**
 *
 * @author Cedric
 */
public class ZoomOutAction  implements IAction{

    @Override
    public boolean execute(TimelineModel model, TimelineComponent view) {
        TimeCoordinateTranslator tct = TimeCoordinateTranslator.getInstance();
        tct.zoomOut();
        view.update(UpdateEvent.UPDATE_ZOOM, null);
        return true;
    }

    @Override
    public boolean undo(TimelineModel model, TimelineComponent view) {
        TimeCoordinateTranslator tct = TimeCoordinateTranslator.getInstance();
        tct.zoomIn();
        view.update(UpdateEvent.UPDATE_ZOOM, null);
        return true;
    }
    
}