Skip to content

Commit 7bc152d

Browse files
committed
ADAP-150: Add FX example for docking by layout service
1 parent 6ea1026 commit 7bc152d

4 files changed

Lines changed: 5 additions & 7 deletions

File tree

164 Bytes
Binary file not shown.
9 KB
Binary file not shown.

src/main/java/com/openfin/desktop/demo/FxLayoutFrame.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ public class FxLayoutFrame {
1919
private ExternalWindowObserver externalWindowObserver;
2020
private String windowName;
2121
private Stage stage;
22+
private static JFXPanel jFXPanel;
2223

2324
public FxLayoutFrame(DesktopConnection desktopConnection, String appUuid, String windowName) {
25+
System.out.println(windowName + " being created ");
2426
this.windowName = windowName;
25-
new JFXPanel();
27+
if (jFXPanel == null) {
28+
jFXPanel = new JFXPanel();
29+
}
2630
javafx.application.Platform.runLater(new Runnable() {
2731
@Override
2832
public void run() {

src/main/java/com/openfin/desktop/demo/LayoutServiceDemo.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,9 @@
2020
import javax.swing.SwingUtilities;
2121

2222
import com.openfin.desktop.*;
23-
import javafx.embed.swing.JFXPanel;
24-
import javafx.event.EventHandler;
25-
import javafx.event.EventType;
2623
import org.json.JSONArray;
2724
import org.json.JSONObject;
2825

29-
import com.openfin.desktop.channel.ChannelClient;
30-
import com.openfin.desktop.win32.ExternalWindowObserver;
31-
3226
public class LayoutServiceDemo implements DesktopStateListener {
3327

3428
private final static String appUuid = "layoutServiceDemo";

0 commit comments

Comments
 (0)