use of javafx.embed.swing.JFXPanel in project dwoss by gg-net.
the class SwingCore method wrapDirect.
/**
* Wrap a pane into a JFXPanel on the actual thread, the user must be aware, that this must be run on the JavaFx Thread.
*
* @param pane a Pane to be wrapped.
* @return a CompletableFuture creating the JFXPanel
*/
public static JFXPanel wrapDirect(Pane pane) {
JFXPanel fxp = jfxPanel();
fxp.setScene(new Scene(pane, Color.TRANSPARENT));
SWING_PARENT_HELPER.put(fxp.getScene(), fxp);
return fxp;
}
use of javafx.embed.swing.JFXPanel in project dwoss by gg-net.
the class BuilderUtil method wrapPane.
/**
* Plafrom.runlater() : Wraps a pane into a jfxpanel, which must have been set on the in.getPanel.
*
* @param in
* @return modified in.
*/
static UiParameter wrapPane(UiParameter in) {
if (!(in.getJPanel() instanceof JFXPanel))
throw new IllegalArgumentException("JPanel not instance of JFXPanel : " + in);
JFXPanel fxp = (JFXPanel) in.getJPanel();
fxp.setScene(new Scene(in.getPane(), Color.TRANSPARENT));
SwingCore.mapParent(fxp);
return in;
}
use of javafx.embed.swing.JFXPanel 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);
}
use of javafx.embed.swing.JFXPanel in project dwoss by gg-net.
the class RevenueReportSelectorPane method main.
public static void main(String[] args) throws InterruptedException {
final JFXPanel p = new JFXPanel();
final CountDownLatch block = new CountDownLatch(1);
Platform.runLater(() -> {
RevenueReportSelectorPane pane = new RevenueReportSelectorPane();
Stage stage = new Stage();
stage.setScene(new Scene(pane));
stage.showAndWait();
block.countDown();
});
block.await();
}
use of javafx.embed.swing.JFXPanel in project sakuli by ConSol.
the class AbstractUiTestApplicationIT method startUiApplication.
/**
* Starts the example {@link UiTestApplication}
*/
protected Stage startUiApplication() {
logger.info("............................START");
final UiTestApplication uiTestApplication = new UiTestApplication();
new JFXPanel();
Platform.runLater(uiTestApplication);
return UiTestApplication.stage;
}
Aggregations