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;

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

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