001/*****************************************************************************
002 * Copyright by The HDF Group.                                               *
003 * Copyright by the Board of Trustees of the University of Illinois.         *
004 * All rights reserved.                                                      *
005 *                                                                           *
006 * This file is part of the HDF Java Products distribution.                  *
007 * The full copyright notice, including terms governing use, modification,   *
008 * and redistribution, is contained in the COPYING file, which can be found  *
009 * at the root of the source code distribution tree,                         *
010 * or in https://www.hdfgroup.org/licenses.                                  *
011 * If you do not have access to either file, you may request a copy from     *
012 * help@hdfgroup.org.                                                        *
013 ****************************************************************************/
014
015package hdf.view.dialog;
016
017import org.slf4j.Logger;
018import org.slf4j.LoggerFactory;
019
020import org.eclipse.jface.preference.PreferenceDialog;
021import org.eclipse.jface.preference.PreferenceManager;
022import org.eclipse.swt.SWT;
023import org.eclipse.swt.graphics.Font;
024import org.eclipse.swt.widgets.Shell;
025
026/**
027 * UserOptionsDialog displays components for choosing user options.
028 *
029 * @author Jordan T. Henderson
030 * @version 2.4 2/13/2016
031 */
032public class UserOptionsDialog extends PreferenceDialog {
033
034    private static final Logger log = LoggerFactory.getLogger(UserOptionsDialog.class);
035
036    private Shell shell;
037
038    private Font curFont;
039
040    /** The setting of the root directory */
041    protected String rootDir = null;
042
043    /** The setting of the working directory */
044    protected String workDir = null;
045
046    /**
047     * UserOptionsDialog displays components for choosing user options.
048     *
049     * @param parent
050     *        the dialog parent shell
051     * @param mgr
052     *        the dialog manager
053     * @param viewRoot
054     *        the root dir for the app
055     */
056    public UserOptionsDialog(Shell parent, PreferenceManager mgr, String viewRoot)
057    {
058        super(parent, mgr);
059
060        rootDir = viewRoot;
061    }
062
063    /**
064     * Create the UserOptions Dialog.
065     */
066    public void create()
067    {
068        super.create();
069        getShell().setSize(getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT, true));
070    }
071}