Dialog motif:
[jalview.git] / src / jalview / gui / Desktop.java
index 3ebbb2d..b4b0cdb 100644 (file)
@@ -1192,6 +1192,12 @@ public class Desktop extends jalview.jbgui.GDesktop
     }
 
     // BH 2018 -- providing a callback for SwingJS
+    // dialogOption is just a simple way to provide
+    // context for the modal-like response.
+    // The only requirement is that desktop implement
+    // PropertyChangeListener, which is used already in Java
+    // for changes in input value and such within the dialogs.
+
     String dialogOption = "label.input_alignment_from_url";
     desktop.dialogData = new Object[] { dialogOption, viewport, history };
     desktop.onDialogReturn(
@@ -1200,7 +1206,9 @@ public class Desktop extends jalview.jbgui.GDesktop
             JvOptionPane.OK_CANCEL_OPTION));
 
     // no code may follow this, as SwingJS will not block
-    // callback in JavaScript comes via a property change event
+    // callback in JavaScript comes via a property change event,
+    // thus going into desktop.onDialogReturn(int) just the same as
+    // in Java.
 
   }