/* ----------------------------------------
 * Origin  : GFI INFORMATIQUE 
 * Project : CDPP Propagation Tool 
 * ----------------------------------------
 * History 
 * Version : 01/05/2015 : SCA : V2.1
 * ----------------------------------------
 */
package fr.tlse.irap.pt.client.controller.tools.externalLinks;

import java.util.Date;

import fr.tlse.irap.pt.client.component.DialogComponent;
import fr.tlse.irap.pt.client.controller.RootController;

public class MedocDialogBox {

	private static MedocComponent medocController;

	public static MedocComponent getMedocComponent() {
		if (medocController == null) {
			medocController = new MedocComponent();
			new DialogComponent(medocController, RootController.stage, "MEDOC Interface");

		}
		medocController.getDialog().toFront();
		return medocController;
	}

	/**
	 * Show Medoc interface initialized with date
	 * @param date
	 */
	public static void show(Date startDate, Date endDate) {
	//public static void show(Date date) {
		getMedocComponent().initComponentWith(startDate, endDate);
	}

}