|
17 | 17 | import java.awt.event.WindowListener; |
18 | 18 | import java.util.ArrayList; |
19 | 19 | import java.util.HashMap; |
20 | | -import java.util.Random; |
21 | 20 | import java.util.logging.Logger; |
22 | 21 |
|
23 | 22 | /** |
24 | 23 | * |
25 | 24 | * GUI example that allows for instantiating and controlling |
26 | 25 | * |
| 26 | + * Supported system properties by this demo: |
| 27 | + * |
| 28 | + * 1. to specify security realm for OpenFin Runtime |
| 29 | + * -Dcom.openfin.demo.security.realm=SampleRealm |
| 30 | + * |
| 31 | + * 2. to specify version of OpenFin Runtime |
| 32 | + * -Dcom.openfin.demo.version=5.44.8.56 |
| 33 | + * |
| 34 | + * 3. to specify arguments to be passed to RVM installer |
| 35 | + * -Dcom.openfin.demo.rvm.arguments="--assetsUrl=https://myServer/release --rvm-config=https://myServer/rvm.json" |
| 36 | + * |
| 37 | + * 4. to connect to a port of a running instance of OpenFin Runtime (this is a deprecated use of OpenFin API |
| 38 | + * -Dcom.openfin.demo.port=9000 |
| 39 | + * |
| 40 | + * |
27 | 41 | * Created by wche on 2/28/15. |
28 | 42 | * |
29 | 43 | */ |
@@ -454,6 +468,11 @@ public void onOutgoingMessage(String message) { |
454 | 468 | if (desktopVersion == null) { |
455 | 469 | desktopVersion = "stable"; |
456 | 470 | } |
| 471 | + String rvmArgs = java.lang.System.getProperty("com.openfin.demo.rvm.arguments"); |
| 472 | + if (rvmArgs != null) { |
| 473 | + updateMessagePanel("Additional RVM arguments: " + rvmArgs); |
| 474 | + desktopConnection.setAdditionalRvmArguments(rvmArgs); |
| 475 | + } |
457 | 476 | updateMessagePanel("Connecting to version " + desktopVersion); |
458 | 477 | desktopConnection.connectToVersion(desktopVersion, listener, 10000); |
459 | 478 | } |
@@ -585,27 +604,6 @@ public void onSuccess(WindowBounds result) { |
585 | 604 | }, null); |
586 | 605 | } |
587 | 606 |
|
588 | | - final static public String ISSUER = "issuer"; |
589 | | - final static public String MATURITY = "maturity"; |
590 | | - final static public String COUPON = "coupon"; |
591 | | - final static public String SIZE = "size"; |
592 | | - final static public String CCY = "ccy"; |
593 | | - final static public String ACCOUNT = "account"; |
594 | | - final static public String PLATFORM = "platform"; |
595 | | - final static public String MARKET_DATA = "marketData"; |
596 | | - final static public String TYPE = "type"; |
597 | | - final static public String STATUS = "status"; |
598 | | - final static public String EXPIRATION_TIME = "expirationTime"; |
599 | | - final static public String ID = "id"; |
600 | | - final static public String PRICE = "price"; |
601 | | - |
602 | | - private Random random = new Random(); |
603 | | - private static final String[] issuers = {"GS", "JPM", "UBS", "MS", "DB", "BC", "BA"}; |
604 | | - private static final String[] ccys = {"USD", "JPY", "GBP", "EUR", "CHF", "CAD"}; |
605 | | - private static final String[] accounts = {"ABC Capital", "DEF Capital", "GHI Capital"}; |
606 | | - private static final String[] platforms = {"Trade Desk"}; |
607 | | - private static final String[] types = {"ASK", "BID"}; |
608 | | - |
609 | 607 | private void setMainButtonsEnabled(boolean enabled) { |
610 | 608 | java.lang.System.out.println("setMainButtonsEnabled " + enabled); |
611 | 609 | launch.setEnabled(!enabled); |
|
0 commit comments