/*
 * This file is a part of EpnTAPClient.
 * This program aims to provide EPN-TAP support for software clients, like CASSIS spectrum analyzer.
 * See draft specifications: https://voparis-confluence.obspm.fr/pages/viewpage.action?pageId=559861
 * Copyright (C) 2016 Institut de Recherche en Astrophysique et Planétologie.
 *
 * This program is free software: you can
 * redistribute it and/or modify it under the terms of the GNU General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or (at your option) any later
 * version. This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE. See the GNU General Public License for more details. You should have received a copy of
 * the GNU General Public License along with this program. If not, see
 * <http://www.gnu.org/licenses/>.
 */

package eu.omp.irap.vespa.epntapclient.gui.mainpanel;

import java.io.File;

/**
 * @author N. Jourdane
 */
public interface MainPanelListener {

	/**
	 * Display an error message to the user.
	 *
	 * @param message A short version of the message.
	 * @param error The exception related to the error.
	 */
	void displayError(String message, Exception error);

	/**
	 * Display an informative message to the user.
	 *
	 * @param shortMessage A short version of the message.
	 * @param detailledMessage The full message to display (optional, can be null).
	 */
	void displayInfo(String shortMessage, String detailledMessage);

	/**
	 * Ask the main panel to save the VOTable displayed in the focused tab on the result panel.
	 *
	 * @param file The file specified by the user on the FileChooser popup.
	 */
	void saveCurrentVOTable(File file);

	/** Ask the main panel to send the query. */
	void sendQueries();

	/**
	 * Set the cursor in the VOTable view.
	 *
	 * @param enableWaitMode True to set the Wait cursor, false to set the default cursor.
	 */
	void setWaitMode(boolean enableWaitMode);

	/** Ask the main panel to update the query. */
	void updateQuery();
}
