package de.prob2.ui;

import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.ImageView;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

public class ProB2Preloader extends javafx.application.Preloader {

	Stage loadingStage;
	Scene scene;
	
	@Override
    public void init() {
		final Parent root = new BorderPane(new ImageView(ProB2.class.getResource("/prob_logo.gif").toExternalForm()));
		scene = new Scene(root);
	}

	@Override
	public void start(Stage primaryStage) throws Exception {
		this.loadingStage = primaryStage;
		this.loadingStage.setTitle("Loading ProB 2.0...");
		this.loadingStage.setScene(scene);
		this.loadingStage.show();
	}
	
	@Override
	public void handleProgressNotification(ProgressNotification info) {
		if (info.getProgress() == 100) {
			loadingStage.hide();
		}
	}
}

@@ -15,16 +15,53 @@
 b2.ui;%0A%0A
+import javafx.application.Preloader;%0A
 import j
@@ -247,35 +247,16 @@
 extends 
-javafx.application.
 Preloade
@@ -259,18 +259,25 @@
 oader %7B%0A
-%0A
 %09
+private 
 Stage lo
@@ -289,16 +289,24 @@
 Stage;%0A%09
+private 
 Scene sc
@@ -327,12 +327,9 @@
 ide%0A
-    
+%09
 publ
@@ -401,16 +401,25 @@
 ew(ProB2
+Preloader
 .class.g
@@ -497,16 +497,17 @@
 ot);%0A%09%7D%0A
+%09
 %0A%09@Overr
@@ -552,25 +552,8 @@
 age)
- throws Exception
  %7B%0A%09
@@ -740,24 +740,27 @@
 d handle
-Progress
+Application
 Notifica
@@ -764,24 +764,41 @@
 ication(
-Progress
+final Preloader.Preloader
 Notifica
@@ -820,16 +820,100 @@
 if (info
+ instanceof Preloader.ProgressNotification && ((Preloader.ProgressNotification)info)
 .getProg
@@ -932,16 +932,21 @@
 0) %7B%0A%09%09%09
+this.
 loadingS

Fix loading stage hiding in preloader