2,2c2,2 < * @(#)DrawApplet.java 5.2 --- > * @(#)DrawApplet.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 19a201,201 > } 20,20d200 < 27a33,34 > * > * @version <$CURRENT_VERSION$> 28a205,205 > } 29,29d204 < 37,37c43,43 < transient private StandardDrawingView fView; --- > transient private DrawingView fView; 76,76c82,82 < getContentPane().add("Center", fView); --- > getContentPane().add("Center", (Component)view()); 131,131c137,137 < choice.addItem(new ChangeAttributeCommand("none", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_NONE), fView)); --- > choice.addItem(new ChangeAttributeCommand("none", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_NONE), view())); 132,132c138,138 < choice.addItem(new ChangeAttributeCommand("at Start", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_START), fView)); --- > choice.addItem(new ChangeAttributeCommand("at Start", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_START), view())); 133,133c139,139 < choice.addItem(new ChangeAttributeCommand("at End", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_END), fView)); --- > choice.addItem(new ChangeAttributeCommand("at End", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_END), view())); 134,134c140,140 < choice.addItem(new ChangeAttributeCommand("at Both", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_BOTH), fView)); --- > choice.addItem(new ChangeAttributeCommand("at Both", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_BOTH), view())); 152a159,159 > view() 153,153d158 < fView 165a172,172 > for (int i = 0; i < fonts.length; i++) { 166,166d171 < for (int i = 0; i < fonts.length; i++) 167,167c173,173 < choice.addItem(new ChangeAttributeCommand(fonts[i], "FontName", fonts[i], fView)); --- > choice.addItem(new ChangeAttributeCommand(fonts[i], "FontName", fonts[i], view())); 167a174,174 > } 192,192c199,199 < if (param == null) --- > if (param == null) { 195,195c203,203 < while (st.hasMoreTokens()) --- > while (st.hasMoreTokens()) { 198,198c207,207 < if (drawingChoice.getItemCount() > 1) --- > if (drawingChoice.getItemCount() > 1) { 199a209,210 > } > else { 200,200d208 < else 201a212,212 > } 216,216c227,227 < button = new CommandButton(new DeleteCommand("Delete", fView)); --- > button = new CommandButton(new DeleteCommand("Delete", view())); 219,219c230,230 < button = new CommandButton(new DuplicateCommand("Duplicate", fView)); --- > button = new CommandButton(new DuplicateCommand("Duplicate", view())); 222,222c233,233 < button = new CommandButton(new GroupCommand("Group", fView)); --- > button = new CommandButton(new GroupCommand("Group", view())); 225,225c236,236 < button = new CommandButton(new UngroupCommand("Ungroup", fView)); --- > button = new CommandButton(new UngroupCommand("Ungroup", view())); 242,242c253,253 < if (fSimpleUpdate) --- > if (fSimpleUpdate) { 243a255,256 > } > else { 244,244d254 < else 247a260,260 > } 306,306c319,319 < protected StandardDrawingView createDrawingView() { --- > protected DrawingView createDrawingView() { 325,325c338,338 < if (inside) --- > if (inside) { 326a340,341 > } > else { 327,327d339 < else 329a344,344 > } 369,369c384,384 < public void selectionChanged(DrawingView view) { --- > public void figureSelectionChanged(DrawingView view) { 375,375c390,390 < fView.setDrawing(fDrawing); --- > view().setDrawing(fDrawing); 380,380c395,395 < if (fTool != null) --- > if (fTool != null) { 381a397,397 > } 390,390c406,406 < if (fSelectedToolButton != null) --- > if (fSelectedToolButton != null) { 391a408,408 > } 393,393c410,410 < if (fSelectedToolButton != null) --- > if (fSelectedToolButton != null) { 395a413,413 > } 405,405c423,423 < if (filename != null) --- > if (filename != null) { 407a426,426 > } 412,412c431,431 < if (type.equals("storable")) --- > if (type.equals("storable")) { 413a433,433 > } 414,414c434,434 < else if (type.equals("serialized")) --- > else if (type.equals("serialized")) { 415a436,437 > } > else { 416,416d435 < else 418a440,440 > } 427a450,451 > view().setDrawing(fDrawing); > } 428,428d449 < fView.setDrawing(fDrawing); 429,429c452,452 < } catch (IOException e) { --- > catch (IOException e) { 441a465,466 > view().setDrawing(fDrawing); > } 442,442d464 < fView.setDrawing(fDrawing); 443,443c467,467 < } catch (IOException e) { --- > catch (IOException e) { 445a470,470 > } 446,446c471,471 < } catch (ClassNotFoundException e) { --- > catch (ClassNotFoundException e) { 453,453c478,478 < if (file.endsWith(".draw")) --- > if (file.endsWith(".draw")) { 454a480,480 > } 455,455c481,481 < if (file.endsWith(".ser")) --- > if (file.endsWith(".ser")) { 456a483,483 > } 467,467c494,494 < FigureEnumeration k = fView.selectionElements(); --- > FigureEnumeration k = view().selectionElements(); 480,480c507,507 < if (arrowMode != null) --- > if (arrowMode != null) { 481a509,509 > } 482,482c510,510 < if (fontName != null) --- > if (fontName != null) { 484a513,513 > } 487,487c516,516 < fView.setDisplayUpdate(new SimpleUpdateStrategy()); --- > view().setDisplayUpdate(new SimpleUpdateStrategy()); 493,493c522,522 < fView.setDisplayUpdate(new BufferedUpdateStrategy()); --- > view().setDisplayUpdate(new BufferedUpdateStrategy()); 506a536,536 > } 507,507c537,537 < } catch (IOException e) { --- > catch (IOException e) { 517,517c547,547 < if (fSleeper == null) --- > if (fSleeper == null) { 518a549,549 > } 523,523c554,554 < if (fSleeper != null) --- > if (fSleeper != null) { 526a558,558 > } 542a575,575 > } 543,543c576,576 < } catch (InterruptedException e) { --- > catch (InterruptedException e) {