package smart_gs.swingui.toolbar.action;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;

import smart_gs.drawing_tool.LineSegEditorCanvas;
import smart_gs.logical.LineSegment;
import smart_gs.smleditor.swingui.LineSegEditor;

public class LineSegEditorZoomInOutActionListener implements ActionListener {
	LineSegEditor editor;
	String type;
	LineSegEditorCanvas canvas;

	public LineSegEditorZoomInOutActionListener(LineSegEditor editor,String type) {
		this.editor = editor;
		this.type = type;
		this.canvas = editor.getLineSegEditorCanvas();
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		if (this.type.equals("ZoomIn")) this.canvas.zoomIn();
		else if (this.type.equals("ZoomOut")) this.canvas.zoomOut();
		else return;
	}
}