package smart_gs.swingui.toolbar.action;

import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObserver;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;

import smart_gs.drawing_tool.ImageLabel;
import smart_gs.drawing_tool.drawing_mode.LineSegEditorDrawPolygonMode;
import smart_gs.drawing_tool.drawing_mode.LineSegEditorSelectMode;
import smart_gs.drawing_tool.drawing_mode.LineSegEditorTiltImagePanelLevelLineMode;
import smart_gs.logical.LineSegmentForEdit;
import smart_gs.logical.Spread;
import smart_gs.smleditor.swingui.LineSegEditor;

public class LineSegEditorTiltImagePanelLevelLineActionListener implements ActionListener {
	LineSegEditor editor;

	public LineSegEditorTiltImagePanelLevelLineActionListener(LineSegEditor editor) {
		this.editor = editor;
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		LineSegEditorTiltImagePanel panel = this.editor.getTiltPanel();
		if (this.editor.getMode() instanceof LineSegEditorTiltImagePanelLevelLineMode) return;
		this.editor.setMode(new LineSegEditorTiltImagePanelLevelLineMode(this.editor,panel));
	}

}