protected DrawingView createDrawingView(Drawing newDrawing) { Dimension d = getDrawingViewSize(); DrawingView newDrawingView = new StandardDrawingView(this, d.width, d.height); newDrawingView.setDrawing(newDrawing); fireViewCreatedEvent(newDrawingView); return newDrawingView; }
/** Refreshes the drawing if there is some accumulated damage */ public synchronized void checkDamage() { Iterator each = drawing().drawingChangeListeners(); while (each.hasNext()) { Object l = each.next(); if (l instanceof DrawingView) { ((DrawingView) l).repairDamage(); } } }
/** * Creates the drawing view used in this application. You need to override this method to use a * DrawingView subclass in your application. By default a standard DrawingView is returned. */ protected DrawingView createDrawingView() { DrawingView createdDrawingView = createDrawingView(createDrawing()); createdDrawingView.drawing().setTitle(getDefaultDrawingTitle()); return createdDrawingView; }