2,2c2,2 < * @(#)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$> > */ 56,56c65,65 < Tool tool = new TextTool(view(), new TextFigure()); --- > Tool tool = new UndoableTool(new TextTool(view(), new TextFigure())); 58a68,68 > tool = new UndoableTool(new ConnectedTextTool(view(), new TextFigure())); 59,59c69,69 < tool = new ConnectedTextTool(view(), new TextFigure()); --- > // tool = new ConnectedTextTool(view(), new TextFigure()); 65,65c75,75 < tool = new CreationTool(view(), new RectangleFigure()); --- > tool = new UndoableTool(new CreationTool(view(), new RectangleFigure())); 68,68c78,78 < tool = new CreationTool(view(), new RoundRectangleFigure()); --- > tool = new UndoableTool(new CreationTool(view(), new RoundRectangleFigure())); 71,71c81,81 < tool = new CreationTool(view(), new EllipseFigure()); --- > tool = new UndoableTool(new CreationTool(view(), new EllipseFigure())); 74,74c105,105 < tool = new CreationTool(view(), new LineFigure()); --- > tool = new UndoableTool(new BorderTool(view())); 77,77c96,96 < tool = new ConnectionTool(view(), new LineConnection()); --- > tool = new UndoableTool(new ConnectionTool(view(), new LineConnection())); 80,80c99,99 < tool = new ConnectionTool(view(), new ElbowConnection()); --- > tool = new UndoableTool(new ConnectionTool(view(), new ElbowConnection())); 83,83c102,102 < tool = new ScribbleTool(view()); --- > tool = new UndoableTool(new ScribbleTool(view())); 85a84,85 > tool = new UndoableTool(new PolygonTool(view())); > palette.add(createToolButton(IMAGES + "POLYGON", "Polygon Tool", tool)); 86,87d83 < tool = new PolygonTool(view()); < palette.add(createToolButton(IMAGES+"POLYGON", "Polygon Tool", tool)); 88,88c86,86 < --- > 88a87,93 > 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())); 89,89d86 < tool = new BorderTool(view()); 99,99c115,115 < mb.add(createAnimationMenu()); --- > addMenuIfPossible(mb, createAnimationMenu()); 100,100c116,116 < mb.add(createImagesMenu()); --- > addMenuIfPossible(mb, createImagesMenu()); 101,101c117,117 < mb.add(createWindowMenu()); --- > addMenuIfPossible(mb, createWindowMenu()); 147a164,167 > > menu.addSeparator(); > menu.add(new WindowMenu("Window List", (MDIDesktopPane)getDesktop())); > 158a179,179 > menu.add(new UndoableCommand( 159,159c180,180 < menu.add(new InsertImageCommand(name, path, view())); --- > new InsertImageCommand(name, path, view())));