/*
 * Created on Apr 20, 2003
 *
 * To change this generated comment go to 
 * Window>Preferences>Java>Code Generation>Code Template
 */
package jdraw.figures;

import java.awt.Cursor;

import jdraw.framework.*;

/**
 * The AbstractTool supports:
 * - Color
 * - filled or outline mode
 * - xy constraints, i.e. the Figure can only be created with 
 *   the same width and height.
 * @author Christoph
 */
public abstract class AbstractTool implements DrawTool {
	
	private final DrawEditor editor;
	private final DrawView view;
	
	public AbstractTool(DrawEditor editor) {
		this.editor = editor;
		this.view = editor.getView();
	}
	
	protected DrawView getView() {
		return view;
	}
	
	protected DrawEditor getEditor() {
		return editor;
	}
	
	public void deactivate() {
		getView().setCursor(Cursor.getDefaultCursor());
		getEditor().showStatus("");
	}
}
