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

import fr.tlse.irap.pt.client.component.CustomComponent;
import fr.tlse.irap.pt.client.component.ICustomComponent;
import fr.tlse.irap.pt.client.services.constant.CONFIG;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;

public class WelcomeComponent extends GridPane implements ICustomComponent {

	@FXML protected Label labelVersion;
	
	public WelcomeComponent() {
		super();
		CustomComponent.initCustomComponent(this);
	}

	public Node getView() {
		return this;
	}
	
	public void show(boolean isVisible) {
		if (isVisible) {
			labelVersion.setText("Release " + CONFIG.PROJECT_VERSION + " - " + CONFIG.RELEASE_DATE);
		}
		this.setVisible(isVisible);
	}

}
