private int saveOnPermission() { if (!m_isDirty) { return (JOptionPane.OK_OPTION); }
private int saveOnPermission(String promptMessageID) { if (!m_isDirty) { return (JOptionPane.OK_OPTION); }
	private int saveOnPermission() {		if (!m_isDirty) {			return (JOptionPane.OK_OPTION);		}		int response = JOptionPane.showConfirmDialog(				this,				GRI18n.getString(MODULE, "OK_toSaveBeforeClose"),				lastOpenedFile == null?GRI18n.getString(MODULE, "noTitleHeader"):lastOpenedFile.getName(),				JOptionPane.YES_NO_CANCEL_OPTION);		if (JOptionPane.YES_OPTION == response) {			if (null == lastOpenedFile) {				saveAsState();				// If we are still dirty, they cancelled out of save as				// so act as if they cancelled this dialog.				if (m_isDirty) {					return (JOptionPane.CANCEL_OPTION);				}			} else {				saveState();			}			return (JOptionPane.OK_OPTION);		}		if (JOptionPane.NO_OPTION == response) {			// No action requested, tell the caller to go ahead			return (JOptionPane.OK_OPTION);		}		// User reneges, stop the action		return (JOptionPane.CANCEL_OPTION);	}