Skip to content

Commit 76b9366

Browse files
committed
ADAP-170: updated README.md
1 parent 9486245 commit 76b9366

1 file changed

Lines changed: 0 additions & 68 deletions

File tree

README.md

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -90,74 +90,6 @@ Source code for the example is located in /src/main/java/com/openfin/desktop/dem
9090
});
9191
```
9292

93-
## Run the example of docking Java Swing window with HTML5 application
94-
95-
1. Clone this repository
96-
97-
2. Go to release directory and start docking.bat
98-
99-
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.
100-
101-
4. After clicking "Dock to HTML5 app" button, you can move either window to see docking effect.
102-
103-
5. Click "Undock from HTML5 app" to undock 2 windows
104-
105-
## Source Code Review for docking windows
106-
107-
Source code for the example is located in /src/main/java/com/openfin/desktop/demo/OpenFinDockingDemo.java.
108-
109-
1. Create connection object:
110-
111-
```java
112-
this.desktopConnection = new DesktopConnection("OpenFinDockingDemo", "localhost", port);
113-
```
114-
115-
This code just creates an instance and it does not try to connect to runtime.
116-
117-
2. Launch and connect to stable version of OpenFin runtime:
118-
119-
```java
120-
desktopConnection.connectToVersion("stable", listener, 60);
121-
```
122-
123-
listener is an instance of DesktopStateListener which provides callback on status of connections to runtime.
124-
125-
3. Once Runtime is running, an instance of DockingManager is create with
126-
127-
```java
128-
this.dockingManager = new DockingManager(this.desktopConnection, javaParentAppUuid);
129-
```
130-
131-
4. Any OpenFin window can be registered with DockingManager with
132-
133-
```java
134-
dockingManager.registerWindow(openFinWindow);
135-
```
136-
137-
5. Any Java window can be registered with DockingManager with
138-
139-
```java
140-
dockingManager.registerJavaWindow(javaWindowName, jFrame, AckListener);
141-
```
142-
143-
6. An application can receive dock and undock events from DockingManger with
144-
145-
```java
146-
desktopConnection.getInterApplicationBus().subscribe("*", "window-docked", EventListener);
147-
desktopConnection.getInterApplicationBus().subscribe("*", "window-undocked", EventListener);
148-
```
149-
150-
7. An application can request DockingManager to undock a window with:
151-
152-
```java
153-
JSONObject msg = new JSONObject();
154-
msg.put("applicationUuid", javaParentAppUuid);
155-
msg.put("windowName", javaWindowName);
156-
desktopConnection.getInterApplicationBus().publish("undock-window", msg);
157-
```
158-
159-
Once the demo is running, Windows snap while being draggted close to other windows. Snapped windows dock on mounse release.
160-
16193
## Run the example of embedding HTML5 application into a Java Swing window
16294

16395
1. Clone this repository

0 commit comments

Comments
 (0)