private void decideCloseOperation() {
		if (editor.getPage().isWriting()) // reject closing request
			return;
		xOffset -= offset;
		yOffset -= offset;
		if (windowCount >= 1)
			windowCount--;
		if (windowCount < 1) {
			savePreferences();
			LogDumper.sharedInstance().output();
			navigator.output();
			if (restart) {
				reboot();
				restart = false;
			}
			else {
				System.exit(0);
			}
		}
		else {
			editor.getPage().stopAllRunningModels();
			EventQueue.invokeLater(new Runnable() {
				public void run() {
					destroy();
					dispose();
				}
			});
		}
	}