2c2 < * @(#)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 20d25 < 27a33,34 > * > * @version <$CURRENT_VERSION$> 29d35 < 37c43 < transient private StandardDrawingView fView; --- > transient private DrawingView fView; 76c82 < getContentPane().add("Center", fView); --- > getContentPane().add("Center", (Component)view()); 131,134c137,140 < choice.addItem(new ChangeAttributeCommand("none", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_NONE), fView)); < choice.addItem(new ChangeAttributeCommand("at Start", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_START), fView)); < choice.addItem(new ChangeAttributeCommand("at End", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_END), fView)); < choice.addItem(new ChangeAttributeCommand("at Both", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_BOTH), fView)); --- > choice.addItem(new ChangeAttributeCommand("none", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_NONE), view())); > choice.addItem(new ChangeAttributeCommand("at Start", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_START), view())); > choice.addItem(new ChangeAttributeCommand("at End", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_END), view())); > choice.addItem(new ChangeAttributeCommand("at Both", "ArrowMode", new Integer(PolyLineFigure.ARROW_TIP_BOTH), view())); 153c159 < fView --- > view() 166,167c172,174 < for (int i = 0; i < fonts.length; i++) < choice.addItem(new ChangeAttributeCommand(fonts[i], "FontName", fonts[i], fView)); --- > for (int i = 0; i < fonts.length; i++) { > choice.addItem(new ChangeAttributeCommand(fonts[i], "FontName", fonts[i], view())); > } 192c199 < if (param == null) --- > if (param == null) { 193a201 > } 195c203 < while (st.hasMoreTokens()) --- > while (st.hasMoreTokens()) { 196a205 > } 198c207 < if (drawingChoice.getItemCount() > 1) --- > if (drawingChoice.getItemCount() > 1) { 200c209,210 < else --- > } > else { 201a212 > } 216c227 < button = new CommandButton(new DeleteCommand("Delete", fView)); --- > button = new CommandButton(new DeleteCommand("Delete", view())); 219c230 < button = new CommandButton(new DuplicateCommand("Duplicate", fView)); --- > button = new CommandButton(new DuplicateCommand("Duplicate", view())); 222c233 < button = new CommandButton(new GroupCommand("Group", fView)); --- > button = new CommandButton(new GroupCommand("Group", view())); 225c236 < button = new CommandButton(new UngroupCommand("Ungroup", fView)); --- > button = new CommandButton(new UngroupCommand("Ungroup", view())); 242c253 < if (fSimpleUpdate) --- > if (fSimpleUpdate) { 244c255,256 < else --- > } > else { 247a260 > } 306c319 < protected StandardDrawingView createDrawingView() { --- > protected DrawingView createDrawingView() { 325c338 < if (inside) --- > if (inside) { 327c340,341 < else --- > } > else { 329a344 > } 369c384 < public void selectionChanged(DrawingView view) { --- > public void figureSelectionChanged(DrawingView view) { 375c390 < fView.setDrawing(fDrawing); --- > view().setDrawing(fDrawing); 380c395 < if (fTool != null) --- > if (fTool != null) { 381a397 > } 390c406 < if (fSelectedToolButton != null) --- > if (fSelectedToolButton != null) { 391a408 > } 393c410 < if (fSelectedToolButton != null) --- > if (fSelectedToolButton != null) { 395a413 > } 405c423 < if (filename != null) --- > if (filename != null) { 407a426 > } 412c431 < if (type.equals("storable")) --- > if (type.equals("storable")) { 414c433,434 < else if (type.equals("serialized")) --- > } > else if (type.equals("serialized")) { 416c436,437 < else --- > } > else { 418a440 > } 428,429c450,452 < fView.setDrawing(fDrawing); < } catch (IOException e) { --- > view().setDrawing(fDrawing); > } > catch (IOException e) { 442,443c465,467 < fView.setDrawing(fDrawing); < } catch (IOException e) { --- > view().setDrawing(fDrawing); > } > catch (IOException e) { 446c470,471 < } catch (ClassNotFoundException e) { --- > } > catch (ClassNotFoundException e) { 453c478 < if (file.endsWith(".draw")) --- > if (file.endsWith(".draw")) { 455c480,481 < if (file.endsWith(".ser")) --- > } > if (file.endsWith(".ser")) { 456a483 > } 467c494 < FigureEnumeration k = fView.selectionElements(); --- > FigureEnumeration k = view().selectionElements(); 480c507 < if (arrowMode != null) --- > if (arrowMode != null) { 482c509,510 < if (fontName != null) --- > } > if (fontName != null) { 484a513 > } 487c516 < fView.setDisplayUpdate(new SimpleUpdateStrategy()); --- > view().setDisplayUpdate(new SimpleUpdateStrategy()); 493c522 < fView.setDisplayUpdate(new BufferedUpdateStrategy()); --- > view().setDisplayUpdate(new BufferedUpdateStrategy()); 507c536,537 < } catch (IOException e) { --- > } > catch (IOException e) { 517c547 < if (fSleeper == null) --- > if (fSleeper == null) { 518a549 > } 523c554 < if (fSleeper != null) --- > if (fSleeper != null) { 526a558 > } 543c575,576 < } catch (InterruptedException e) { --- > } > catch (InterruptedException e) {