コード例 #1
0
 protected DrawingView createDrawingView(Drawing newDrawing) {
   Dimension d = getDrawingViewSize();
   DrawingView newDrawingView = new StandardDrawingView(this, d.width, d.height);
   newDrawingView.setDrawing(newDrawing);
   fireViewCreatedEvent(newDrawingView);
   return newDrawingView;
 }
コード例 #2
0
 /**
  * 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;
 }