Skip to content

Commit b954067

Browse files
author
Wenjun Che
committed
ADAP-16: Embedding example
1 parent 890cb46 commit b954067

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

README.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -106,35 +106,6 @@ Source code for the example is located in /src/main/java/com/openfin/desktop/dem
106106
3. dockToStartupApp and undockFromStartupApp show to dock and undock 2 windows.
107107

108108

109-
## Run the example of embeding HTML5 application to Java Swing window with awt.canvas
110-
111-
1. Clone this repository
112-
113-
2. Go to release directory and start embedding.bat
114-
115-
3. Once the java app starts, click on "Launch OpenFin" button, which should start OpenFin Runtime and "Hello OpenFin" HTML5 demo app. The java app will wait and try to connect to OpenFin Runtime.
116-
117-
4. You can click "Embed HTML5 app" button bring HTML5 window into Swing window.
118-
119-
## Source Code Review for embedding windows
120-
121-
Source code for the example is located in /src/main/java/com/openfin/desktop/demo/WindowEmbedDemo.java. The followings overview of how it communicates with OpenFin Runtime with API calls supported by the Java adapter:
122-
123-
1. Create connection object:
124-
125-
this.controller = new DesktopConnection("OpenFinDockingDemo", "localhost", port);
126-
127-
This code just creates an instance and it does not try to connect to runtime.
128-
129-
2. Launch and connect to OpenFin runtime:
130-
131-
controller.launchAndConnect(this.desktopCommandLine, listener, 10000);
132-
133-
listener is an instance of DesktopStateListener which provides callback on status of connections to runtime. desktopCommandLine is a string of arguments passed to OpenFinRVM.
134-
This example by default passes remote config file for Hello OpenFin app, which will be started as the first app in OpenFin Runtime.
135-
136-
3. embedStartupApp method shows to embed HTML5 app to Swing window.
137-
138109

139110
## More Info
140111

0 commit comments

Comments
 (0)