JAL-3060 entry points for createFeatures, amendFeatures
[jalview.git] / src / jalview / gui / UserDefinedColours.java
index 3290500..704cfea 100755 (executable)
@@ -480,7 +480,9 @@ public class UserDefinedColours extends GUserDefinedColours
    */
   protected void warnIfUnsavedChanges()
   {
-    if (!changed)
+    // BH 2018 no warning in JavaScript TODO
+    
+    if (/** @j2sNative true || */ !changed)
     {
       return;
     }
@@ -633,7 +635,7 @@ public class UserDefinedColours extends GUserDefinedColours
   {
     upperCaseButtons = new ArrayList<>();
     lowerCaseButtons = new ArrayList<>();
-
+    // TODO: JAL-3048 requires Castor dependency for Jalview-JS
     JalviewFileChooser chooser = new JalviewFileChooser("jc",
             "Jalview User Colours");
     chooser.setFileView(new JalviewFileView());
@@ -743,7 +745,8 @@ public class UserDefinedColours extends GUserDefinedColours
 
     if (ColourSchemes.getInstance().nameExists(name))
     {
-      int reply = JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
+      // BH 2018 SwingJS bypasses this question with YES_OPTION
+      int reply = /** @j2sNative  0 &&  */ JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
               MessageManager.formatMessage(
                       "label.colour_scheme_exists_overwrite", new Object[]
                       { name, name }),
@@ -754,6 +757,8 @@ public class UserDefinedColours extends GUserDefinedColours
         return false;
       }
     }
+    // TODO: JAL-3048 saveas, also requires Castor dependency for Jalview-JS
+
     JalviewFileChooser chooser = new JalviewFileChooser("jc",
             "Jalview User Colours");