use of javafx.embed.swing.JFXPanel in project dwoss by gg-net.
the class OperatorManagmentControllerTest method testJavaFxFxml.
@Test
public void testJavaFxFxml() throws IOException {
if (GraphicsEnvironment.isHeadless())
return;
// Implizit start of JavaFx.
new JFXPanel();
FXMLLoader loader = new FXMLLoader(OperatorManagmentController.loadFxml());
loader.load();
assertThat((OperatorManagmentController) loader.getController()).isNotNull();
}
use of javafx.embed.swing.JFXPanel in project dwoss by gg-net.
the class RightsManagmentControllerTest method testJavaFxFxml.
@Test
public void testJavaFxFxml() throws IOException {
if (GraphicsEnvironment.isHeadless())
return;
// Implizit start of JavaFx.
new JFXPanel();
Dl.remote().add(RightsAgent.class, new RightsAgentStub());
FXMLLoader loader = new FXMLLoader(RightsManagmentController.loadFxml());
loader.load();
assertThat((RightsManagmentController) loader.getController()).isNotNull();
}
use of javafx.embed.swing.JFXPanel in project dwoss by gg-net.
the class ClientView method initFxComponents.
private void initFxComponents() {
try {
progressIndicator = new ProgressIndicator();
progressIndicator.setProgress(0);
BorderPane pane = new BorderPane(progressIndicator);
JFXPanel wrap = SwingCore.wrap(pane);
extraProgressPanel.add(wrap, BorderLayout.CENTER);
} catch (InterruptedException ex) {
Ui.handle(ex);
}
}
use of javafx.embed.swing.JFXPanel in project dwoss by gg-net.
the class ClientTryout method tryout.
@Test
public void tryout() throws InterruptedException {
JFXPanel p = new JFXPanel();
CountDownLatch cdl = new CountDownLatch(1);
final SwingClient ac = new SwingClient() {
@Override
protected void close() {
System.out.println("closing");
cdl.countDown();
}
};
ac.init();
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
ac.show("Tryout", null);
}
});
cdl.await();
}
use of javafx.embed.swing.JFXPanel in project dwoss by gg-net.
the class SwingCore method jfxPanel.
private static JFXPanel jfxPanel() {
// HINT: Be sure, that this can be run on any thread.
JFXPanel result;
if (startHelper != null) {
result = startHelper;
startHelper = null;
} else {
result = new JFXPanel();
}
return result;
}
Aggregations