use of eu.ggnet.dwoss.assembly.remote.DwPreloader in project dwoss by gg-net.
the class DwPreloaderTryout method tryoutPreloader.
@Test
public void tryoutPreloader() throws InterruptedException {
JFXPanel p = new JFXPanel();
final CountDownLatch cdl = new CountDownLatch(1);
DwPreloader pre = new DwPreloader();
Platform.runLater(() -> {
try {
Stage stage = new Stage();
stage.initStyle(StageStyle.UNDECORATED);
pre.start(stage);
cdl.countDown();
} catch (Exception ex) {
ex.printStackTrace();
}
});
cdl.await();
Thread.sleep(2000);
final CountDownLatch cdl2 = new CountDownLatch(1);
Platform.runLater(() -> {
pre.handleStateChangeNotification(new StateChangeNotification(StateChangeNotification.Type.BEFORE_START));
cdl2.countDown();
});
cdl2.await();
Thread.sleep(2000);
}
Aggregations