    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.eclipse.jface.preference.IPreferencePage;
    018import org.eclipse.jface.preference.PreferenceNode;
    019import org.eclipse.jface.resource.ImageDescriptor;
    020
    021/**
    022 * UserOptionsDialog displays components for choosing user options.
    023 */
    024public class UserOptionsNode extends PreferenceNode {
    025    private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(UserOptionsNode.class);
    026    /**
    027     * The name of the class that implements the <code>PreferencePage</code>
    028     * bound to this <code>ExtendedPreferenceNode</code>
    029     */
    030    private String classname;
    031
    032    /**
    033     * Creates an <code>UserOptionsNode</code> with the given id. The
    034     * new node has nosubnodes.
    035     *
    036     * @param id the node id
    037     */
    038    public UserOptionsNode(String id) {
    039        super(id);
    040    }
    041
    042    /**
    043     * Creates an <code>UserOptionsNode</code> with the given id,
    044     * label, and image, and lazily-loaded preference page. The preference node
    045     * assumes (sole) responsibility for disposing of the image; this will
    046     * happen when the node is disposed.
    047     *
    048     * @param id the node id
    049     * @param label the label used to display the node in the preference
    050     *            dialog's tree
    051     * @param image the image displayed left of the label in the preference
    052     *            dialog's tree, or <code>null</code> if none
    053     * @param className the class name of the preference page; this class must
    054     *            implement <code>IPreferencePage</code>
    055     */
    056    public UserOptionsNode(String id, String label,
    057            ImageDescriptor image, String className) {
    058        super(id, label, image, className);
    059        this.classname = className;
    060    }
    061
    062    /**
    063     * Creates an <code>UserOptionsNode</code> with the given id and
    064     * preference page. The title of the preference page is used for the node
    065     * label. The node will not have an image.
    066     *
    067     * @param id the node id
    068     * @param preferencePage the preference page
    069     */
    070    public UserOptionsNode(String id, IPreferencePage preferencePage) {
    071        super(id, preferencePage);
    072    }
    073}