Exemplo n.º 1
0
 /**
  * Open a new window for this application containing the passed in drawing, or a new drawing if
  * the passed in drawing is null.
  */
 public void newWindow(Drawing initialDrawing) {
   DrawApplication window = createApplication();
   if (initialDrawing == null) {
     window.open();
   } else {
     window.open(createDrawingView(initialDrawing));
   }
 }
Exemplo n.º 2
0
 /**
  * Open a new view for this application containing a view of the drawing of the currently
  * activated window.
  */
 public void newView() {
   if (view() == null) {
     return;
   }
   DrawApplication window = createApplication();
   window.open(view());
   if (view().drawing().getTitle() != null) {
     window.setDrawingTitle(view().drawing().getTitle() + " (View)");
   } else {
     window.setDrawingTitle(getDefaultDrawingTitle() + " (View)");
   }
 }