/* ----------------------------------------
 * Origin  : GFI INFORMATIQUE 
 * Project : CDPP Propagation Tool 
 * ----------------------------------------
 * History 
 * Version : 01/05/2015 : SCA : V2.1
 * Version : 13/05/2016 : SCA : V2.2
 * Change windows style
 * ----------------------------------------
 */
package fr.tlse.irap.pt.client.controller.dialogbox;

import fr.tlse.irap.pt.client.component.DialogComponent;
import fr.tlse.irap.pt.client.controller.RootController;
import javafx.stage.Modality;
import javafx.stage.StageStyle;

public class ProgressDialogBox {

	private static ProgressComponent progressController;

	public static ProgressComponent getProgressComponent() {
		if (progressController == null) {
			progressController = new ProgressComponent();
			new DialogComponent(progressController, RootController.stage, Modality.NONE, StageStyle.UNDECORATED);

		}
		return progressController;
	}

	public static void show(String txt) {
		getProgressComponent().setMessage(txt).show();
	}

	public static void hide() {
		getProgressComponent().hide();
	}

	public static void setText2(String txt) {
		getProgressComponent().setMessage2(txt);
	}

}