001/** 002 * GUIPreferences -- A collection of preferences for the GUI program. 003 * 004 * Copyright (C) 2009-2024, by Joseph A. Huwaldt. All rights reserved. 005 * 006 * This library is free software; you can redistribute it and/or modify it under the terms 007 * of the GNU Lesser General Public License as published by the Free Software Foundation; 008 * either version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, but WITHOUT ANY 011 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 012 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 013 * 014 * You should have received a copy of the GNU Lesser General Public License along with 015 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - 016 * Suite 330, Boston, MA 02111-1307, USA. Or visit: http://www.gnu.org/licenses/lgpl.html 017 */ 018package geomss.app; 019 020import jahuwaldt.swing.MainApp; 021import static java.util.Objects.requireNonNull; 022 023/** 024 * This class serves as a collection of preferences for this program. 025 * 026 * <p> Modified by: Joseph A. Huwaldt </p> 027 * 028 * @author Joseph A. Huwaldt, Date: May 2, 2009 029 * @version January 1, 2024 030 */ 031public class GUIPreferences extends AppPreferences { 032 033 // A reference to the window containing the applicatin preferences. 034 //private PrefsDialog prefsDialog = null; 035 // Reference to the main application object for this program. 036 private final MainApp app; 037 038 /** 039 * Construct the preferences object for this application. This constructor will locate 040 * the preference file and load in any available preferences for the application. 041 * 042 * @param app Reference to the main application. 043 */ 044 public GUIPreferences(MainApp app) { 045 this.app = requireNonNull(app); 046 } 047 048 /** 049 * Method that displays a dialog that allows the user to change the application 050 * preferences. If the application is running in batch mode, this method does nothing. 051 */ 052 @Override 053 public void showPreferenceDialog() { 054 /* if (app.getGUIApplication() != null) { 055 if (prefsDialog != null) 056 prefsDialog.setVisible(true); 057 058 else { 059 prefsDialog = new PrefsDialog(); 060 AppUtilities.positionWindow( prefsDialog, prefsDialog.getWidth(), prefsDialog.getHeight() ); 061 prefsDialog.setVisible(true); 062 } 063 } 064 */ 065 } 066 067}