/* * @(#)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 java.awt.*; /** * DrawingEditor defines the interface for coordinating * the different objects that participate in a drawing editor. * *
* Design Patterns

*  o * 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(); /** * 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 selection has changed. * Override this method to handle selection changes. */ public void figureSelectionChanged(DrawingView view); /** * Shows a status message in the editor's user interface */ public void showStatus(String string); }