2c2 < * @(#)JavaDrawApp.java 5.2 --- > * @(#)JavaDrawApp.java 3a4,9 > * 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 19a26,28 > /** > * @version <$CURRENT_VERSION$> > */ 56c65 < Tool tool = new TextTool(view(), new TextFigure()); --- > Tool tool = new UndoableTool(new TextTool(view(), new TextFigure())); 59c68,69 < tool = new ConnectedTextTool(view(), new TextFigure()); --- > tool = new UndoableTool(new ConnectedTextTool(view(), new TextFigure())); > // tool = new ConnectedTextTool(view(), new TextFigure()); 65c75 < tool = new CreationTool(view(), new RectangleFigure()); --- > tool = new UndoableTool(new CreationTool(view(), new RectangleFigure())); 68c78 < tool = new CreationTool(view(), new RoundRectangleFigure()); --- > tool = new UndoableTool(new CreationTool(view(), new RoundRectangleFigure())); 71c81 < tool = new CreationTool(view(), new EllipseFigure()); --- > tool = new UndoableTool(new CreationTool(view(), new EllipseFigure())); 74c84,93 < tool = new CreationTool(view(), new LineFigure()); --- > tool = new UndoableTool(new PolygonTool(view())); > palette.add(createToolButton(IMAGES + "POLYGON", "Polygon Tool", tool)); > > tool = new UndoableTool(new CreationTool(view(), new TriangleFigure())); > palette.add(createToolButton(IMAGES + "TRIANGLE", "Triangle Tool", tool)); > > tool = new UndoableTool(new CreationTool(view(), new DiamondFigure())); > palette.add(createToolButton(IMAGES + "DIAMOND", "Diamond Tool", tool)); > > tool = new UndoableTool(new CreationTool(view(), new LineFigure())); 77c96 < tool = new ConnectionTool(view(), new LineConnection()); --- > tool = new UndoableTool(new ConnectionTool(view(), new LineConnection())); 80c99 < tool = new ConnectionTool(view(), new ElbowConnection()); --- > tool = new UndoableTool(new ConnectionTool(view(), new ElbowConnection())); 83c102 < tool = new ScribbleTool(view()); --- > tool = new UndoableTool(new ScribbleTool(view())); 86,89c105 < tool = new PolygonTool(view()); < palette.add(createToolButton(IMAGES+"POLYGON", "Polygon Tool", tool)); < < tool = new BorderTool(view()); --- > tool = new UndoableTool(new BorderTool(view())); 99,101c115,117 < mb.add(createAnimationMenu()); < mb.add(createImagesMenu()); < mb.add(createWindowMenu()); --- > addMenuIfPossible(mb, createAnimationMenu()); > addMenuIfPossible(mb, createImagesMenu()); > addMenuIfPossible(mb, createWindowMenu()); 147a164,167 > > menu.addSeparator(); > menu.add(new WindowMenu("Window List", (MDIDesktopPane)getDesktop())); > 159c179,180 < menu.add(new InsertImageCommand(name, path, view())); --- > menu.add(new UndoableCommand( > new InsertImageCommand(name, path, view())));