File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
src/main/java/com/openfin/desktop/demo Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 33## New Features
44* Add browser-style navigation to Window class
55* Add support for fallbackVersion of Runtime
6+ * Add support for non-persistent connections to Runtime
67
78## Bug Fixes
89* Fixed an issue with loop of re-connecting to Runtime
Original file line number Diff line number Diff line change @@ -407,6 +407,13 @@ public void run() {
407407 }
408408 }
409409
410+ private void resetUI () {
411+ setMainButtonsEnabled (false );
412+ setAppButtonsEnabled (false );
413+ ((DefaultListModel ) this .activeApplications .getModel ()).clear ();
414+ this .applicationList .clear ();
415+ this .appOptionsList .clear ();
416+ }
410417
411418 private void closeDesktop () {
412419 if (desktopConnection != null && desktopConnection .isConnected ()) {
@@ -415,11 +422,7 @@ private void closeDesktop() {
415422// this.desktopConnection.disconnect();
416423// Application app = Application.wrap(this.startupUUID, this.desktopConnection);
417424// app.close();
418- setMainButtonsEnabled (false );
419- setAppButtonsEnabled (false );
420- ((DefaultListModel ) this .activeApplications .getModel ()).clear ();
421- this .applicationList .clear ();
422- this .appOptionsList .clear ();
425+ resetUI ();
423426 } catch (Exception e ) {
424427 e .printStackTrace ();
425428 }
@@ -428,7 +431,7 @@ private void closeDesktop() {
428431 SwingUtilities .invokeLater (new Runnable () {
429432 @ Override
430433 public void run () {
431- jFrame .dispose ();
434+ // jFrame.dispose();
432435 }
433436 });
434437 try {
@@ -499,6 +502,7 @@ public void onReady() {
499502 @ Override
500503 public void onClose () {
501504 updateMessagePanel ("Connection closed" );
505+ resetUI ();
502506 }
503507
504508 @ Override
You can’t perform that action at this time.
0 commit comments