*/
	private void savePageAndClose() {
		SaveReminder reminder = editor.getPage().getSaveReminder();
		int opt = JOptionPane.NO_OPTION;
		if (!editor.getPage().isRemote() && reminder.isChanged())
			opt = reminder.showConfirmDialog(this, FileUtilities.getFileName(editor.getPage().getAddress()));
		if (opt == JOptionPane.NO_OPTION) {
			if (windowCount == 1) {
				if (!SnapshotGallery.sharedInstance().isEmpty()) {
					String s = getInternationalText("Snapshot");
					if (JOptionPane.showConfirmDialog(Modeler.this, "You have taken some snapshots. Do you want to save them?", s != null ? s : "Snapshot", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
						editor.getPage().importSnapshots();
						SnapshotGallery.sharedInstance().clear();
						opt = JOptionPane.CANCEL_OPTION;
					}
				}
			}
		}
		switch (opt) {
		case JOptionPane.YES_OPTION:
			setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
			editor.getPage().saveAndClose(this);
			break;
		case JOptionPane.NO_OPTION:
			decideCloseOperation();
			break;
		case JOptionPane.CANCEL_OPTION:
			setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
			break;
		default:
			decideCloseOperation();
		}
	}