package smart_gs.drawing_tool.state;
//package smart_gs.drawing_tool.state;
//
//import java.awt.Cursor;
//import java.awt.Graphics;
//import java.awt.Image;
//import java.awt.Point;
//import java.awt.Toolkit;
//import java.awt.event.MouseEvent;
//import java.util.ArrayList;
//
//import javax.swing.ImageIcon;
//import javax.swing.JPopupMenu;
//
//import smart_gs.GSConstants;
//import smart_gs.current_text_search.CurrentSearchTextWithoutDialog;
//
//import smart_gs.drawing_tool.DrawingModeSelectionPopupMenu;
//import smart_gs.drawing_tool.ImageLabel;
//import smart_gs.drawing_tool.LineSegEditorImageLabel;
//import smart_gs.drawing_tool.LineSegEditorCanvas;
//import smart_gs.drawing_tool.RightClickMenu;
//import smart_gs.drawing_tool.SpreadCanvas;
//import smart_gs.drawing_tool.drawing_mode.AnchorMode;
//import smart_gs.drawing_tool.drawing_mode.BookmarkMode;
//import smart_gs.drawing_tool.drawing_mode.DefaultDrawingMode;
//import smart_gs.drawing_tool.drawing_mode.LineSegEditorDrawMode;
//import smart_gs.drawing_tool.drawing_mode.DeleteMode;
//import smart_gs.drawing_tool.drawing_mode.LineSegEditorMode;
//import smart_gs.drawing_tool.drawing_mode.MarkerMode;
//import smart_gs.drawing_tool.drawing_mode.MemoPadMode;
//import smart_gs.drawing_tool.drawing_mode.Mode;
//import smart_gs.drawing_tool.drawing_mode.PolygonMode;
//import smart_gs.drawing_tool.drawing_mode.RectangleMode;
//import smart_gs.logical.Preference;
//import smart_gs.reasoning_web.swingui.GlobalViewPanel;
//import smart_gs.smleditor.swingui.GSEditor;
//import smart_gs.smleditor.swingui.GSTabbedPane;
//import smart_gs.smleditor.swingui.IDATPanel;
//import smart_gs.smleditor.swingui.LineSegEditor;
//import smart_gs.swingui.AbstractGSWindow;
//import smart_gs.swingui.GSMouseEvent;
//import smart_gs.swingui.WorkspaceWindow;
//import smart_gs.swingui.toolbar.GSEditorToolBar;
//import smart_gs.swingui.toolbar.ImageToolBar;
//import smart_gs.util.ImageToolBarSetModeByMouseEvent;
//import smart_gs.util.GSWindowByMouseEvent;
//
//public class LineSegEditorDefaultState implements LineSegEditorState{
//	
//	private LineSegEditor editor;
//	private LineSegEditorMode mode;
//	private Cursor cursor;
//	private LineSegEditorCanvas canvas;
//	
//	public LineSegEditorDefaultState(LineSegEditorCanvas canvas,LineSegEditor editor) {
//		this.editor = editor;
//		this.canvas = canvas;
//		this.mode = (LineSegEditorMode) new LineSegEditorDrawMode(editor);
//		this.setCursor(Cursor.getDefaultCursor());
//	}
//
//	public void setMode1(LineSegEditorMode mode2){
//		LineSegEditorImageLabel imageLabel = canvas.getLineSegEditorImageLabel();
//		this.mode.cancel();
//		this.mode = mode2;
//		imageLabel.setCursor(this.cursor);
//	}
//
//	public void mouseClicked(GSMouseEvent e, LineSegEditorCanvas canvas) {
//		boolean ctrlPressed = WorkspaceWindow.getInstance().isCtrl();
//		boolean altPressed = WorkspaceWindow.getInstance().isAlt();
//		boolean shiftPressed = WorkspaceWindow.getInstance().isShift();
//		int clickCount = e.getClickCount();
//		int button = e.getButton();
//
//		this.mode.mouseClicked(e,canvas);
//	}
//
//	private void rightButtonClickAction (GSMouseEvent e) {
////		JPopupMenu menu = new LineSegEditorRightClickPopupMenu(canvas.getSpread());;
////		menu.show(e.getComponent(),e.getOriginalPoint().x,e.getOriginalPoint().y);
////		GlobalViewPanel.getInstance().repaint();
//	}
//		
//	public void mouseDragged(GSMouseEvent e, LineSegEditorCanvas canvas) {
//		this.mode.mouseDragged(e,canvas);
//	}
//
//	public void mouseEntered(GSMouseEvent e, LineSegEditorCanvas canvas) {
//		this.mode.mouseEntered(e,canvas);
//	}
//
//	public void mouseExited(GSMouseEvent e, LineSegEditorCanvas canvas) {
//		this.mode.mouseExited(e,canvas);
//	}
//
//	public void mouseMoved(GSMouseEvent e, LineSegEditorCanvas canvas) {
//		mode.mouseMoved(e,canvas);		
//	}
//
//	public void mousePressed(GSMouseEvent e, LineSegEditorCanvas canvas) {
//		mode.mousePressed(e, canvas);
//	}
//
//	public void mouseReleased(GSMouseEvent e, LineSegEditorCanvas canvas) {
//		mode.mouseReleased(e, canvas);
//	}
//
//	public void paint(Graphics g, LineSegEditorCanvas canvas) {
//		mode.paint(g,canvas);
//	}
//
//	public LineSegEditorMode getMode() {
//		return this.mode;
//	}
//
//	@Override
//	public int getType() {
//		return State.DEFAULT;
//	}
//	
//	public void changeCursorTo(LineSegEditorMode mode) {
////		Point hotSpot = new Point(0, 0);
////		Toolkit kit = Toolkit.getDefaultToolkit();
////		if (mode instanceof DefaultDrawingMode) {
////			this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
////		} else if (mode instanceof RectangleMode) {
////			this.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
////		} else if (mode instanceof PolygonMode) {
////			this.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
////		} else if (mode instanceof AnchorMode) {
////			Image img = new ImageIcon(GSConstants.ICON_PATH+"anchor_cursor.png").getImage();
////			String name = "anchor_cursor";
////			this.setCursor(kit.createCustomCursor(img, hotSpot, name));
////		} else if (mode instanceof BookmarkMode) {
////			ImageIcon imageIcon = new ImageIcon(GSConstants.ICON_PATH+ Preference.getInstance().getDefaultBookmarkPath());
////			Image img = imageIcon.getImage();
////			hotSpot = new Point(10,30);
////			String name = "bookmark_cursor";
////			this.setCursor(kit.createCustomCursor(img, hotSpot, name));
////		} else if (mode instanceof DeleteMode) {
////			Image img = new ImageIcon(GSConstants.ICON_PATH+"deleter.png").getImage();
////			String name = "deleter_cursor";
////			this.setCursor(kit.createCustomCursor(img, new Point(5,5), name));
////		} else if (mode instanceof MemoPadMode) {
////			Image img = new ImageIcon(GSConstants.ICON_PATH+"memopad_cursor.png").getImage();
////			String name = "memopad_cursor";
////			this.setCursor(kit.createCustomCursor(img, hotSpot, name));
////		} else if (mode instanceof MarkerMode) {
////			Image img = new ImageIcon(GSConstants.ICON_PATH+"marker_cursor.png").getImage();
////			String name = "marker_cursor";
////			this.setCursor(kit.createCustomCursor(img, hotSpot, name));
////		} else {
//			this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
////		}
//		
//	}
//
//	public void setCursor(Cursor cursor) {
//		this.cursor = cursor;
//	}
//
//	public Cursor getCursor() {
//		return cursor;
//	}
//
//	@Override
//	public void setMode(LineSegEditorMode mode) {
//		// TODO Auto-generated method stub
//		
//	}
//
//	@Override
//	public LineSegEditor getParentLinesegEditor() {
//		// TODO Auto-generated method stub
//		return null;
//	}
//
//	@Override
//	public void setParentLinesegEditor() {
//		// TODO Auto-generated method stub
//		
//	}
//}
