/* * @(#)DrawingEditor.java * * Project: JHotdraw - a GUI framework for technical drawings * http://www.jhotdraw.org * http://jhotdraw.sourceforge.net * Copyright: © by the original author(s) and all contributors * License: Lesser GNU Public License (LGPL) * http://www.opensource.org/licenses/lgpl-license.html */ package CH.ifa.draw.framework; import CH.ifa.draw.util.UndoManager; /** * DrawingEditor defines the interface for coordinating * the different objects that participate in a drawing editor. * *
*
* Mediator
* DrawingEditor is the mediator. It decouples the participants
* of a drawing editor.
*
* @see Tool
* @see DrawingView
* @see Drawing
*
* @version <$CURRENT_VERSION$>
*/
public interface DrawingEditor extends FigureSelectionListener {
/**
* Gets the editor's drawing view.
*/
public DrawingView view();
public DrawingView[] views();
/**
* Gets the editor's drawing.
*/
// public Drawing drawing();
/**
* Gets the editor's current tool.
*/
public Tool tool();
/**
* Informs the editor that a tool has done its interaction.
* This method can be used to switch back to the default tool.
*/
public void toolDone();
/**
* Informs that the current figure selection has changed.
* Override this method to handle selection changes.
*/
public void figureSelectionChanged(DrawingView view);
public void addViewChangeListener(ViewChangeListener vsl);
public void removeViewChangeListener(ViewChangeListener vsl);
/**
* Shows a status message in the editor's user interface
*/
public void showStatus(String string);
public UndoManager getUndoManager();
}