    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.DataView;
    016
    017import hdf.object.HObject;
    018import hdf.view.TreeView.TreeView;
    019
    020/**
    021 *
    022 * Defines a list of APIs for the main HDFView windows
    023 *
    024 * @author Peter X. Cao
    025 * @version 2.4 9/6/2007
    026 */
    027public abstract interface DataViewManager {
    028    /** Data content is displayed, add the dataview to the main windows
    029     * @param dataView
    030     *            the dataView whose presence in the main view is to be added.
    031     */
    032    public abstract void addDataView(DataView dataView);
    033
    034    /** Data content is closed, remove the dataview from the main window
    035     * @param dataView
    036     *            the dataView whose presence in the main view is to be removed.
    037     */
    038    public abstract void removeDataView(DataView dataView);
    039
    040    /**
    041     * Returns DataView that contains the specified data object. It is useful to
    042     * avoid redundant display of data object that is opened already.
    043     *
    044     * @param dataObject
    045     *            the object whose presence in the main view is to be tested.
    046     *
    047     * @return DataView contains the specified data object, null if the data
    048     *         object is not displayed.
    049     */
    050    public abstract DataView getDataView(HObject dataObject);
    051
    052    /**
    053     * Display feedback message
    054     *
    055     * @param msg
    056     *            the status message to display
    057     */
    058    public abstract void showStatus(String msg);
    059
    060    /**
    061     * Display error message
    062     *
    063     * @param errMsg
    064     *            the error message to display
    065     */
    066    public abstract void showError(String errMsg);
    067
    068    /** @return the current TreeView */
    069    public abstract TreeView getTreeView();
    070
    071    /**
    072     * Start stop a timer.
    073     *
    074     * @param toggleTimer
    075     *            -- true: start timer, false stop timer.
    076     */
    077    public abstract void executeTimer(boolean toggleTimer);
    078
    079}