/** * 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)); } }
/** * 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)"); } }
public static void main(String[] args) { DrawApplication window = new NetApp(); window.open(); }