001/*
002 * This file is part of McIDAS-V
003 *
004 * Copyright 2007-2024
005 * Space Science and Engineering Center (SSEC)
006 * University of Wisconsin - Madison
007 * 1225 W. Dayton Street, Madison, WI 53706, USA
008 * https://www.ssec.wisc.edu/mcidas/
009 * 
010 * All Rights Reserved
011 * 
012 * McIDAS-V is built on Unidata's IDV and SSEC's VisAD libraries, and
013 * some McIDAS-V source code is based on IDV and VisAD source code.  
014 * 
015 * McIDAS-V is free software; you can redistribute it and/or modify
016 * it under the terms of the GNU Lesser Public License as published by
017 * the Free Software Foundation; either version 3 of the License, or
018 * (at your option) any later version.
019 * 
020 * McIDAS-V is distributed in the hope that it will be useful,
021 * but WITHOUT ANY WARRANTY; without even the implied warranty of
022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
023 * GNU Lesser Public License for more details.
024 * 
025 * You should have received a copy of the GNU Lesser Public License
026 * along with this program.  If not, see https://www.gnu.org/licenses/.
027 */
028package edu.wisc.ssec.mcidasv.chooser;
029
030import org.w3c.dom.Element;
031
032import ucar.unidata.idv.chooser.IdvChooser;
033import ucar.unidata.idv.chooser.IdvChooserManager;
034import ucar.unidata.util.PreferenceList;
035
036/**
037 * A very simple chooser that allows for convenient access of remote model data.
038 */
039public class TDSGridChooser extends XmlChooser {
040
041    /**
042     * Create the {@code XmlChooser}
043     *
044     * @param mgr The {@link IdvChooserManager}. Cannot be {@code null}.
045     * @param root XML root that defines this chooser. Cannot be {@code null}.
046     *
047     */
048    public TDSGridChooser(IdvChooserManager mgr, Element root) {
049        super(mgr, root);
050    }
051
052    /**
053     * Overridden by McIDAS-V so that we're always calling 
054     * {@link IdvChooser#getPreferenceList(String, boolean)} and thus always
055     * performing a merge of user preferences and values from 
056     * {@code mcidasv.properties}.
057     * 
058     * @param listProp Ignored for this chooser.
059     */
060    @Override public PreferenceList getPreferenceList(String listProp) {
061        return super.getPreferenceList("idv.data.grid.list", true);
062    }
063}