diff --git a/README.md b/README.md index 9632f5e..a724e32 100644 --- a/README.md +++ b/README.md @@ -90,84 +90,18 @@ Source code for the example is located in /src/main/java/com/openfin/desktop/dem }); ``` -## Run the example of docking Java Swing window with HTML5 application - -1. Clone this repository - -2. Go to release directory and start docking.bat - -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. - -4. After clicking "Dock to HTML5 app" button, you can move either window to see docking effect. - -5. Click "Undock from HTML5 app" to undock 2 windows - -## Source Code Review for docking windows - -Source code for the example is located in /src/main/java/com/openfin/desktop/demo/OpenFinDockingDemo.java. - -1. Create connection object: - -```java - this.desktopConnection = new DesktopConnection("OpenFinDockingDemo", "localhost", port); -``` - - This code just creates an instance and it does not try to connect to runtime. - -2. Launch and connect to stable version of OpenFin runtime: - -```java - desktopConnection.connectToVersion("stable", listener, 60); -``` - - listener is an instance of DesktopStateListener which provides callback on status of connections to runtime. - -3. Once Runtime is running, an instance of DockingManager is create with - -```java - this.dockingManager = new DockingManager(this.desktopConnection, javaParentAppUuid); -``` - -4. Any OpenFin window can be registered with DockingManager with - -```java - dockingManager.registerWindow(openFinWindow); -``` - -5. Any Java window can be registered with DockingManager with - -```java - dockingManager.registerJavaWindow(javaWindowName, jFrame, AckListener); -``` - -6. An application can receive dock and undock events from DockingManger with - -```java - desktopConnection.getInterApplicationBus().subscribe("*", "window-docked", EventListener); - desktopConnection.getInterApplicationBus().subscribe("*", "window-undocked", EventListener); -``` - -7. An application can request DockingManager to undock a window with: - -```java - JSONObject msg = new JSONObject(); - msg.put("applicationUuid", javaParentAppUuid); - msg.put("windowName", javaWindowName); - desktopConnection.getInterApplicationBus().publish("undock-window", msg); -``` - -Once the demo is running, Windows snap while being draggted close to other windows. Snapped windows dock on mounse release. - ## Run the example of embedding HTML5 application into a Java Swing window 1. Clone this repository -2. Go to release directory and start embed.bat +2. Go to release directory and start embed.bat ( the default embedded url is https://openfin.co. Pass the url you wish to load if you want something different e.g. embed.bat https://www.mydomain.com ) -3. Once the java app starts, click on "Launch OpenFin" button, which should start OpenFin Runtime and embed the OpenFin application that points to https://openfin.co +3. Once the java app starts, click on "Launch OpenFin" button, which should start OpenFin Runtime and embed the OpenFin application that points to https://openfin.co (or your custom url if you specified one) 4. Click "Shutdown OpenFin" button to close HTML5 application and the Java Swing window +If there is a problem rendering the url please check your windows display settings to see ensure scaling is set to 100%. + ## Source Code Review for embedded OpenFin application Source code for the example is located in /src/main/java/com/openfin/desktop/demo/WindowEmbedDemo.java diff --git a/RELEASENOTES-ADAPTER.md b/RELEASENOTES-ADAPTER.md index e75f041..61be86c 100644 --- a/RELEASENOTES-ADAPTER.md +++ b/RELEASENOTES-ADAPTER.md @@ -1,3 +1,12 @@ +# Version 7.2.1 +## New Features +* Add support for FDC3 service + +# Version 7.1.3 +## New Features +* Add support for the new notification service +* DesktopStateListener.onError is called for exceptions from websocket + # Version 7.1.2 ## Bug Fixes diff --git a/pom.xml b/pom.xml index 46bccd4..d5e3e4c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ co.openfin openfin-desktop-java-example - 7.1.1 + 9.0.1 jar openfin-desktop-java-example @@ -58,12 +58,7 @@ co.openfin openfin-desktop-java-adapter - 7.1.3-SNAPSHOT - - - co.openfin - openfin-snap-dock - 1.0.0.1 + 9.2.0 tablelayout diff --git a/release/channel.bat b/release/channel.bat new file mode 100644 index 0000000..492c1d2 --- /dev/null +++ b/release/channel.bat @@ -0,0 +1,9 @@ +@ECHO OFF +REM This program is an example of channel API. It can be run as channel provider or client +REM Channel name: ChannelExample +REM usage: channel.bat [ provider | client ] +set mode=%1 +IF "%~1" == "" set mode=provider +echo Channel type set to: %mode% +java -cp lib/hamcrest-core-1.3.jar;lib/hamcrest-library-1.1.jar;lib/jetty-client-9.4.18.v20190429.jar;lib/jetty-http-9.4.18.v20190429.jar;lib/jetty-io-9.4.18.v20190429.jar;lib/jetty-util-9.4.18.v20190429.jar;lib/jetty-xml-9.4.18.v20190429.jar;lib/jna-4.5.1.jar;lib/jna-platform-4.5.1.jar;lib/json-20160810.jar;lib/junit-4.11.jar;lib/mockito-core-1.9.5.jar;lib/objenesis-1.0.jar;lib/openfin-desktop-java-adapter-9.0.1-SNAPSHOT.jar;lib/openfin-desktop-java-example-9.0.1.jar;lib/slf4j-api-1.7.21.jar;lib/slf4j-jdk14-1.6.1.jar;lib/slf4j-log4j12-1.7.18.jar;lib/TableLayout-20050920.jar;lib/websocket-api-9.4.18.v20190429.jar;lib/websocket-client-9.4.18.v20190429.jar;lib/websocket-common-9.4.18.v20190429.jar -Djava.util.logging.config.file=logging.properties -Dcom.openfin.demo.version=stable com.openfin.desktop.demo.ChannelExample %mode% + diff --git a/release/docking.bat b/release/docking.bat deleted file mode 100644 index 9a50a30..0000000 --- a/release/docking.bat +++ /dev/null @@ -1,5 +0,0 @@ -REM batch to run Docking example of OpenFin and Java windows with Layout service. -REM layout.html is a simple example of OpenFin window that uses Layout service. -REM For this example to work, layout.html needs to be hosted by a web server and its URL needs to be configured with -Dcom.openfin.demo.layout.url - -java -cp openfin-desktop-java-example-7.1.1.jar;openfin-desktop-java-adapter-7.1.1.jar;TableLayout-20050920.jar;jna-4.1.0.jar;jna-platform-4.1.0.jar;json-20140107.jar;slf4j-api-1.7.5.jar;slf4j-jdk14-1.6.1.jar;websocket-api-9.3.12.v20160915.jar;websocket-client-9.3.12.v20160915.jar;websocket-common-9.3.12.v20160915.jar;jetty-io-9.3.12.v20160915.jar;jetty-util-9.3.12.v20160915.jar -Djava.util.logging.config.file=logging.properties -Dcom.openfin.demo.layout.url=http://localhost:8008/layout.html com.openfin.desktop.demo.LayoutServiceDemo diff --git a/release/embed.bat b/release/embed.bat index 2646f66..6533229 100644 --- a/release/embed.bat +++ b/release/embed.bat @@ -1 +1,5 @@ -java -cp openfin-desktop-java-example-6.0.1.3-SNAPSHOT.jar;openfin-desktop-java-adapter-7.0.1.jar;TableLayout-20050920.jar;jna-4.5.1.jar;jna-platform-4.5.1.jar;json-20140107.jar;slf4j-api-1.7.5.jar;slf4j-jdk14-1.6.1.jar;websocket-api-9.3.12.v20160915.jar;websocket-client-9.3.12.v20160915.jar;websocket-common-9.3.12.v20160915.jar;jetty-io-9.3.12.v20160915.jar;jetty-util-9.3.12.v20160915.jar -Djava.util.logging.config.file=logging.properties -Dcom.openfin.demo.embed.URL=https://openfin.co -Dcom.openfin.demo.version=stable com.openfin.desktop.demo.WindowEmbedDemo \ No newline at end of file +@ECHO OFF +set url=%1 +IF "%~1" == "" set url=https://openfin.co +echo Embedded url set to: %url% +java -cp lib/hamcrest-core-1.3.jar;lib/hamcrest-library-1.1.jar;lib/jetty-client-9.4.18.v20190429.jar;lib/jetty-http-9.4.18.v20190429.jar;lib/jetty-io-9.4.18.v20190429.jar;lib/jetty-util-9.4.18.v20190429.jar;lib/jetty-xml-9.4.18.v20190429.jar;lib/jna-4.5.1.jar;lib/jna-platform-4.5.1.jar;lib/json-20160810.jar;lib/junit-4.11.jar;lib/log4j-1.2.17.jar;lib/mockito-core-1.9.5.jar;lib/objenesis-1.0.jar;lib/openfin-desktop-java-adapter-9.0.1-SNAPSHOT.jar;lib/openfin-desktop-java-example-9.0.1.jar;lib/slf4j-api-1.7.21.jar;lib/slf4j-jdk14-1.6.1.jar;lib/slf4j-log4j12-1.7.18.jar;lib/TableLayout-20050920.jar;lib/websocket-api-9.4.18.v20190429.jar;lib/websocket-client-9.4.18.v20190429.jar;lib/websocket-common-9.4.18.v20190429.jar -Djava.util.logging.config.file=logging.properties -Dcom.openfin.demo.embed.URL=%URL% -Dcom.openfin.demo.version=stable com.openfin.desktop.demo.WindowEmbedDemo diff --git a/release/fxdemo.bat b/release/fxdemo.bat index ec7a4d9..e37e8fd 100644 --- a/release/fxdemo.bat +++ b/release/fxdemo.bat @@ -1 +1 @@ -java -cp openfin-desktop-java-example-6.0.1.3-SNAPSHOT.jar;openfin-desktop-java-adapter-7.0.2.jar;TableLayout-20050920.jar;jna-4.5.1.jar;jna-platform-4.5.1.jar;json-20140107.jar;slf4j-api-1.7.5.jar;slf4j-jdk14-1.6.1.jar;websocket-api-9.3.12.v20160915.jar;websocket-client-9.3.12.v20160915.jar;websocket-common-9.3.12.v20160915.jar;jetty-io-9.3.12.v20160915.jar;jetty-util-9.3.12.v20160915.jar -Djava.util.logging.config.file=logging.properties -Dcom.openfin.demo.embed.URL=https://openfin.co com.openfin.desktop.demo.FxDemo +java -cp lib/hamcrest-core-1.3.jar;lib/hamcrest-library-1.1.jar;lib/jetty-client-9.4.18.v20190429.jar;lib/jetty-http-9.4.18.v20190429.jar;lib/jetty-io-9.4.18.v20190429.jar;lib/jetty-util-9.4.18.v20190429.jar;lib/jetty-xml-9.4.18.v20190429.jar;lib/jna-4.5.1.jar;lib/jna-platform-4.5.1.jar;lib/json-20160810.jar;lib/junit-4.11.jar;lib/log4j-1.2.17.jar;lib/mockito-core-1.9.5.jar;lib/objenesis-1.0.jar;lib/openfin-desktop-java-adapter-8.0.8.jar;lib/openfin-desktop-java-example-7.1.1-tests.jar;lib/openfin-desktop-java-example-7.1.1.jar;lib/openfin-snap-dock-1.0.0.1.jar;lib/slf4j-api-1.7.21.jar;lib/slf4j-jdk14-1.6.1.jar;lib/slf4j-log4j12-1.7.18.jar;lib/TableLayout-20050920.jar;lib/websocket-api-9.4.18.v20190429.jar;lib/websocket-client-9.4.18.v20190429.jar;lib/websocket-common-9.4.18.v20190429.jar -Djava.util.logging.config.file=logging.properties -Dcom.openfin.demo.embed.URL=https://openfin.co com.openfin.desktop.demo.FxDemo diff --git a/release/jetty-io-9.3.12.v20160915.jar b/release/jetty-io-9.3.12.v20160915.jar deleted file mode 100644 index e83d5ca..0000000 Binary files a/release/jetty-io-9.3.12.v20160915.jar and /dev/null differ diff --git a/release/jetty-util-9.3.12.v20160915.jar b/release/jetty-util-9.3.12.v20160915.jar deleted file mode 100644 index 57366eb..0000000 Binary files a/release/jetty-util-9.3.12.v20160915.jar and /dev/null differ diff --git a/release/jna-4.1.0.jar b/release/jna-4.1.0.jar deleted file mode 100644 index 9bbb63d..0000000 Binary files a/release/jna-4.1.0.jar and /dev/null differ diff --git a/release/jna-4.2.2.jar b/release/jna-4.2.2.jar deleted file mode 100644 index a943670..0000000 Binary files a/release/jna-4.2.2.jar and /dev/null differ diff --git a/release/jna-platform-4.1.0.jar b/release/jna-platform-4.1.0.jar deleted file mode 100644 index b4ce438..0000000 Binary files a/release/jna-platform-4.1.0.jar and /dev/null differ diff --git a/release/jna-platform-4.2.2.jar b/release/jna-platform-4.2.2.jar deleted file mode 100644 index f3a9fd2..0000000 Binary files a/release/jna-platform-4.2.2.jar and /dev/null differ diff --git a/release/json-20140107.jar b/release/json-20140107.jar deleted file mode 100644 index 9037768..0000000 Binary files a/release/json-20140107.jar and /dev/null differ diff --git a/release/junit.bat b/release/junit.bat index b6c9af5..b79d81f 100644 --- a/release/junit.bat +++ b/release/junit.bat @@ -6,4 +6,4 @@ set RuntimeVersion="stable" set RuntimeVersion="%1" ) -java -cp openfin-desktop-java-example-7.1.1-tests.jar;openfin-desktop-java-adapter-7.1.1-SNAPSHOT.jar;TableLayout-20050920.jar;jna-4.5.1.jar;jna-platform-4.5.1.jar;json-20160810.jar;slf4j-api-1.7.5.jar;slf4j-jdk14-1.6.1.jar;junit-4.11.jar;hamcrest-core-1.3.jar;hamcrest-core-1.3.jar;hamcrest-library-1.1.jar;mockito-core-1.9.5.jar;websocket-api-9.3.12.v20160915.jar;websocket-client-9.3.12.v20160915.jar;websocket-common-9.3.12.v20160915.jar;jetty-io-9.3.12.v20160915.jar;jetty-util-9.3.12.v20160915.jar -Djava.util.logging.config.file=logging.properties -Dcom.openfin.test.runtime.version=%RuntimeVersion% org.junit.runner.JUnitCore com.openfin.desktop.AllTests +java -cp lib/hamcrest-core-1.3.jar;lib/hamcrest-library-1.1.jar;lib/jetty-client-9.4.18.v20190429.jar;lib/jetty-http-9.4.18.v20190429.jar;lib/jetty-io-9.4.18.v20190429.jar;lib/jetty-util-9.4.18.v20190429.jar;lib/jetty-xml-9.4.18.v20190429.jar;lib/jna-4.5.1.jar;lib/jna-platform-4.5.1.jar;lib/json-20160810.jar;lib/junit-4.11.jar;lib/log4j-1.2.17.jar;lib/mockito-core-1.9.5.jar;lib/objenesis-1.0.jar;lib/openfin-desktop-java-adapter-9.2.0.jar;lib/openfin-desktop-java-example-9.2.1-tests.jar;lib/slf4j-api-1.7.21.jar;lib/slf4j-jdk14-1.6.1.jar;lib/slf4j-log4j12-1.7.18.jar;lib/TableLayout-20050920.jar;lib/websocket-api-9.4.18.v20190429.jar;lib/websocket-client-9.4.18.v20190429.jar;lib/websocket-common-9.4.18.v20190429.jar -Djava.util.logging.config.file=logging.properties -Dcom.openfin.test.runtime.version=%RuntimeVersion% org.junit.runner.JUnitCore com.openfin.desktop.AllTests diff --git a/release/launchExternal.html b/release/launchExternal.html new file mode 100644 index 0000000..18ba220 --- /dev/null +++ b/release/launchExternal.html @@ -0,0 +1,45 @@ + + + LaunchExternalProcess example + + + + + + +

LaunchExternalProcess example

+
+
+
+ Full Path + +
+ + + \ No newline at end of file diff --git a/release/layout.html b/release/layout.html index bdf0d95..eba023b 100644 --- a/release/layout.html +++ b/release/layout.html @@ -1,6 +1,6 @@ - Openfin Layouts Included + Openfin Layouts Example