package smart_gs.util;

import java.awt.Component;
import java.awt.Container;
import java.awt.event.MouseEvent;

import smart_gs.drawing_tool.ImageLabel;
import smart_gs.drawing_tool.LineSegEditorImageLabel;
import smart_gs.drawing_tool.SpreadCanvas;
import smart_gs.smleditor.swingui.GSEditor;
import smart_gs.smleditor.swingui.LineSegEditor;
import smart_gs.swingui.AbstractGSWindow;
import smart_gs.swingui.WorkspaceWindow;
import sml_editor.swingui.GSHTMLEditorTextPane;

public class LineSegEditorByMouseEvent {
	public LineSegEditor getLineSegEditor(MouseEvent e) {
		LineSegEditor editor = null;
		Component eventcomponent = e.getComponent();

		if (eventcomponent instanceof LineSegEditorImageLabel) {
			LineSegEditorImageLabel lsedimageLabel = (LineSegEditorImageLabel)eventcomponent;
			editor = lsedimageLabel.getEditor();
		}

		return editor;
	}
}
