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

import java.net.URL;
import java.util.ResourceBundle;

import fr.tlse.irap.pt.client.component.DialogComponent;
import fr.tlse.irap.pt.client.component.IDialogComponent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.layout.AnchorPane;

public class ProgressComponent extends AnchorPane implements Initializable, IDialogComponent {

	private DialogComponent dialog;

	@FXML private Label msg1; 
	@FXML private Label msg2; 

	@Override
	public void initialize(URL location, ResourceBundle resources) {
	}

	public void setDialog(DialogComponent dialog) {
		this.dialog = dialog;
	}

	public Label getMsg1() {
		return msg1;
	}

	public Label getMsg() {
		return msg2;
	}

	public ProgressComponent setMessage(String message) {
		this.msg1.setText(message);
		return this;
	}

	public ProgressComponent setMessage2(String message) {
		this.msg2.setText(message);
		return this;
	}

	public void show() {
		dialog.show();
	}
	
	public void hide() {
		dialog.hide();
	}

}
