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 files COPYING and Copyright.html. * 009 * COPYING can be found at the root of the source code distribution tree. * 010 * Or, see https://support.hdfgroup.org/products/licenses.html * 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.eclipse.jface.preference.PreferenceDialog; 018import org.eclipse.jface.preference.PreferenceManager; 019import org.eclipse.swt.SWT; 020import org.eclipse.swt.graphics.Font; 021import org.eclipse.swt.widgets.Shell; 022 023/** 024 * UserOptionsDialog displays components for choosing user options. 025 * 026 * @author Jordan T. Henderson 027 * @version 2.4 2/13/2016 028 */ 029public class UserOptionsDialog extends PreferenceDialog { 030 031 private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(UserOptionsDialog.class); 032 033 private Shell shell; 034 035 private Font curFont; 036 037 /** The setting of the root directory */ 038 protected String rootDir = null; 039 040 /** The setting of the working directory */ 041 protected String workDir = null; 042 043 /** 044 * UserOptionsDialog displays components for choosing user options. 045 * 046 * @param parent 047 * the dialog parent shell 048 * @param mgr 049 * the dialog manager 050 * @param viewRoot 051 * the root dir for the app 052 */ 053 public UserOptionsDialog(Shell parent, PreferenceManager mgr, String viewRoot) { 054 super(parent, mgr); 055 056 rootDir = viewRoot; 057 } 058 059 /** 060 * Create the UserOptions Dialog. 061 */ 062 public void create() { 063 super.create(); 064 getShell().setSize(getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT, true)); 065 } 066}