protected void InitWidgetFromToken()
 {   // If we don't check for null, we get awful errors in the designer.
     // Good idea to check for that anyway, yeah?
     if (token != null)
     {
         InitWidgetFromToken((SaveConfigToken)token.Clone());
     }
 }
        /// <summary>
        /// Sets the FileType and SaveConfigToken parameters that are used if the
        /// user chooses "Save" from the File menu. These are not used by the
        /// DocumentControl class and should be used by whoever actually goes
        /// to save the Document instance.
        /// </summary>
        /// <param name="fileType"></param>
        /// <param name="saveParameters"></param>
        public void SetDocumentSaveOptions(string newFilePath, FileType newFileType, SaveConfigToken newSaveConfigToken)
        {
            this.filePath = newFilePath;
            OnFilePathChanged();

            this.fileType = newFileType;

            if (newSaveConfigToken == null)
            {
                this.saveConfigToken = null;
            }
            else
            {
                this.saveConfigToken = (SaveConfigToken)newSaveConfigToken.Clone();
            }

            OnSaveOptionsChanged();
        }